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

**URL:** <https://forum.inductiveautomation.com/t/bug-vision-expression-toint-f-returns-integer-0/36470>\
**Category:** Ignition\
**Created:** [July 8, 2020, 5:06am UTC](https://forum.inductiveautomation.com/t/bug-vision-expression-toint-f-returns-integer-0/36470 "2020-07-08T05:06:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 8, 2020, 5:06am UTC](https://forum.inductiveautomation.com/t/bug-vision-expression-toint-f-returns-integer-0/36470/1 "2020-07-08T05:06:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![BenKearney](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@BenKearney](https://forum.inductiveautomation.com/u/BenKearney)\
**Post date:** [July 8, 2020, 9:49am UTC](https://forum.inductiveautomation.com/t/bug-vision-expression-toint-f-returns-integer-0/36470/2 "2020-07-08T09:49:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [July 8, 2020, 9:52am UTC](https://forum.inductiveautomation.com/t/bug-vision-expression-toint-f-returns-integer-0/36470/3 "2020-07-08T09:52:33Z")

</div>

Heh, nice one, `toInt('T')` is casted to 1 😆

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 8, 2020, 11:00am UTC](https://forum.inductiveautomation.com/t/bug-vision-expression-toint-f-returns-integer-0/36470/4 "2020-07-08T11:00:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 8, 2020, 11:14am UTC](https://forum.inductiveautomation.com/t/bug-vision-expression-toint-f-returns-integer-0/36470/5 "2020-07-08T11:14:56Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 8, 2020, 12:15pm UTC](https://forum.inductiveautomation.com/t/bug-vision-expression-toint-f-returns-integer-0/36470/6 "2020-07-08T12:15:11Z")

</div>

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
