Originally posted by David Garcia
Hi everyone,
I have a Tcl proc that calculates the difference in days between the current date and the discharge date. The proc is applied to a COPY action in an xlate and the result is saved in a temp variable and then tested in an IF action. I'm satisfied that the proc is working correctly.
The plan was to test the temp variable in the translation and take action if the number of days is greater than 7. The problem is that the numeric comparison operators do not work as expected on the result.
I ran a bunch of tests. Assuming
@elapsed_days contains 16, the following IF expressions evaluate to true or false
@elapsed_days > =7 false
@elapsed_days gt =7 false
@elapsed_days gt =07 true
@elapsed_days == =16 false
@elapsed_days eq =16 true
Can anyone explain what is going on here?
Thanks!
Dave