Author Topic: CTF : "if" statements are case INsensitive  (Read 2513 times)

Stephane B

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
CTF : "if" statements are case INsensitive
« 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 :
Quote
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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: CTF : "if" statements are case INsen
« Reply #1 on: August 12, 2013, 08:53:22 am »
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.
« Last Edit: August 12, 2013, 08:53:32 am by simonm »