18:57 < Insidious> there seems to be a deficiency in MZX's string comparisons.
18:58 < Insidious> if "$string" = "J" "shiggityblam"
18:58 < Insidious> that will trigger if string is J or j
18:58 < Insidious> string comparisons should not imo be case insensitive, or at
least, there should be a case sensitivity option
19:00 < nooodl> what, really

19:00 < Insidious> yeah, I just came across that problem because I had J
signifying Jack and j signifiying Jane
19:00 < Insidious> and it kept thinking Jack had two turns and jane had none

19:01 < nooodl> hmm. you're right
19:01 < Insidious> (because the comparison between the letter and J came first
and blocked the comparison between it and j)
19:01 < Insidious> jane is now Q.

19:02 < nooodl> is this even documented anywhere
19:02 < Insidious> I doubt it.
19:02 < nooodl> the entry on IF string equality string doesn't mention it
19:02 < nooodl> file a bug
Basically, this example
set "$string" "j"
if "$string" = "J" "klarf"
* String does not equal uppercase J
end
:klarf
* String equals uppercase J
end
will output "String equals uppercase J" even when this is not true.
I ran into this issue when using a string as a surrogate array, and pulling elements out to determine turn order in my RPG. J stood for the 1st character, codenamed "Jack" and j stood for the second, codenamed "Jane". This bug, due to the structure of the code, caused Jack to show up in the turn order twice instead of Jack and then Jane.