@Lewis: The thread topic actually relates to what PB variable type represents a boolean. The answers which were given were that byte, word, long, quad, and integer could be used.Lewis wrote:Sure, although this doesn't contribute much to the TRUE/FALSE thread (for what that academic conversation is worth).
The academic part, which I believe was started by you, doesn't really relate to the thread. I admit I departed from the thread topic a little when I was responding to the ideas you stated as being important.
I found several incompatibilities in your assumptions. The first is that IMHO Boolean types are primarily used for conditionals and not calculations. Using a Boolean type in a calculation is more a characteristic of slow computers or limited memory than sound programming strategy (though it does have its uses:roll: Very observant of you, blueznl!However, the value not-zero is impossible to use directly in calculations, unlike a TRUE value of -1, which in certain circumstances can also improve code readability.
Tips: Code and run X = NOT 0, and then code and run Y = NOT -1.
![]()

Fred said that he planned on making a Boolean() function that would evaluate a conditional expression and would be usable in calculations. I'm not sure what it would return for the TRUE value. As you stated, it would be important that it returns a consistent value, i.e. -1 or 1 but not both, whenever it evaluates to TRUE.