Thanks for all the responses. It looks like it is better to use eq for strings which I was unaware of until now and I have modified the code to do that. It does work now as expected.
I guess I was confused because I thought the == could pretty much be used for anything including strings. We have a book “Tcl and the Tk Toolkit” written by John K. Ousterhout, the guy who actually created Tcl and Tk and in this book there is a table which says the operand types for the == are int, real, string. So I thought it simply would have treated the + and – as strings.
However, since eq appears to be best practice I’ll try to use that from now on. Thanks again guys!