Hey guys!
I'm not quite sure but I think logical operators with strings behave a bit strange:
This piece prints "5", I expected "1" (True).
Apparently, the logical operation always returns the length of the second operand.
Using OR, it's the other way round, it returns the length of the first string.
This does what I expected: Returns 1 (True)
As you can see, putting the operands in variables first alters the result of the logical operation.
Greetings,
hamZta
I'm not quite sure but I think logical operators with strings behave a bit strange:
Local str1:String = "a" Local str2:String = "defgh" Print (str1 And str2)
This piece prints "5", I expected "1" (True).
Apparently, the logical operation always returns the length of the second operand.
Using OR, it's the other way round, it returns the length of the first string.
Print ("a" And "defgh")
This does what I expected: Returns 1 (True)
As you can see, putting the operands in variables first alters the result of the logical operation.
Greetings,
hamZta