[BUG] Vision expression toInt("F") returns integer 0?

v7.9.14

I just found out that if I use the expression: toInt("F") this returns integer 0. Is this a bug or am I missing something?

I’m guessing it’s interpreting F as a shortcut for false?

Heh, nice one, toInt('T') is casted to 1 :laughing:

Definitely sounds like a bug to me! Or an unwanted quirky feature at the very least

Huh. Looks like T and F are the only ones that resolve.

EDIT: Besides ‘True’ and ‘False’, of course…

I think this is more quirky unwanted feature than bug. There’s a bunch of weird string to int coercions that work:

“off”, “false”, “f”, “no”, “n” -> 0
"on, “true”, “t”, “yes”, “y” -> 1
“infinity” -> some max value for the type

1 Like