It would be GREAT if boolean was added to the global variable types. I’ve been using integers 0 and 1, but since I cannot seem to set {something} equal to !{something} it is cumbersome to toggle such a variable. (At the moment I have to branch, if it is zero set it to one, otherwise set it to zero, this is time consuming to build, lots fo clicking).

This could be accomplished by making a new type and some supporting functions, or by supporting JS-style coercion where an integer 0 would be treated as a boolean FALSE if one tried to toggle it, and a positive integer or non-zero-length string would be treated as TRUE, etc.

2 answers

I agree, this would be a handy feature.


Good idea, hope we could have it soon.


This question is now closed