Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: Stephane B on August 09, 2013, 11:57:30 pm
-
Hello,
I noticed that, in code templates and transformation templates, if statements are case insensitive.
Firstly, this is the opposite of what if written in the user guide :
If conditional statements on strings are case sensitive, "a String" does not equal "A STRING". Hence in some situations it is better to set the variable $str= TO_LOWER(variable) or TO_UPPER(variable) then compare to a specific case.
Secondly, IMHO equality tests should be case sensitive, because you can always simulate insensitivity with TO_LOWER, but not the other way around. And for my own use, I don't want the same behaviour for operations returning long and Long.
Is it a bug in EA10 or a wrongness in the user guide ?
Thanks for your answers,
Stéphane
-
If I remember correctly (which means I could be wrong) the string comparison is case insensitive.
While my personal opinion is that case-sensitivity makes a whole lot more sense, if the current behaviour is for case-insensitivity then I would not expect it to be ever changed. It is just too likely that it would break existing templates.