Hi, Below I have four comparison tests. I am curious as to which would provide the least overhead and/or fastest results.
set var 1
if {$var ==1} {
..do something
}
if {[string equal $var 1] == 1} {
..do something
}
if {[string match 1 $var] == 1} {
..do something
}
if {[string compare 1 $var] == 0} {
..do something
}
Harold
set var 1
if {$var ==1} {
..do something
}
if {[string equal $var 1] == 1} {
..do something
}
if {[string match 1 $var] == 1} {
..do something
}
if {[string compare 1 $var] == 0} {
..do something
}
Harold