We’re in the process of upgrading to 5.8.4 from 5.5Rev1 and I ran across something while testing an xlate. We have some TCL code to look for a “+” or “-” character for a charge interface we have. If we see a “-” in FT1-6 we multiply FT1-10 by -1. Works fine in 5.5Rev1 but in 5.8.4 it fails due to incorrect evaluation when comparing the “+” and “-” characters when using the “==” operator. I thought it might be something with the testing tool but when I go to the shell and enter the TCL expression there I get the same result. We do have a workaround because it works using other operators for string comparison. I thought I might post it though to see if anyone else is experiencing this. Here is the output so you may see what I am talking about:
hcitcl>if {”+” == “-“} {echo “true”} else {echo “false”}
true
hcitcl>if {”+” eq “-“} {echo “true”} else {echo “false”}
false
hcitcl>string compare “+” “-”
-1
hcitcl>if {[cequal “+” “-“]} {echo “true”} else {echo “false”}
false
I noticed there was a bug supposedly fixed in 5.8.4 related to the format command and incorrectly parsing negative numbers. However these are being treated as strings so I wouldn’t think the two are related.
Anyone else having issues using “==” operator for string comparison?