Thanks for the hint, however strictly speaking false is zero and true might be any value not zero, so this working depends compiler/controller (and a bit of luck?)
True - but I've not had any issues so far. Also use if(.x) rather than if(.x !=0 ) - would be interesting to know if it actually saves any memory / or time. Must do a test...
Any halfway decent compiler should optimize the expression, BTW, you probably don’t want to include a space between the exclamation mark and the equal sign as it should throw a syntax error. The correct syntax is if ( .x != 0 )
And in flowcode you can use <> which is easier on the eyes for novice programmers…
The trick from mnfisher I will remember, together with the remark that "false is zero and true might be any value not zero"..
As a non programmer readability is necessary for me, so I mostly use <>.
Flowcode is a nice program to not need to read code so the simpeler it gets the better.
But for an example like val2 = (val1 < 20)?3:2 there is a lot of commands needed..
I will start a Onenote to keep these tricks for me to remember.