Forum Discussion
Mike_Gorski_625
May 03, 2018Nimbostratus
Now that I dig deeper I am seeing documented examples of iRule code using "table lookup" with numeric and string comparisons interchangeably
if { [table lookup -notouch $mykey] equals "" } {
table set $mykey "1" $timeout $timeout
}
Note, the above example uses "equals" (a string comparison) and subsequent table set command uses "1" (a string value).
if { [table lookup -notouch $mykey] == "" } {
table set $mykey 1 $timeout $timeout
}
Above, uses numeric comparison (==) and subsequent set command uses numeric 1 (not string).
So I think the assumption is that any needed type-casting will be handled gracefully. It still doesn't explain the error condition we ran into.