localroger said...
There is no case in Spin where ==false and ==true are both false.
Actually, 5 == false and 5 == true are both false in Spin, since they're the same as 5 == 0 and 5 == -1, respectively. "<> 0" is the universal promoter to a Boolean truth value from a numeric one.
Having true be equal to -1 has a singular advantage in a processor without a single-cycle multiply, since you can combine Boolean expressions with arithmetic expressions using the much quicker bitwise and (&).
Comments
Having true be equal to -1 has a singular advantage in a processor without a single-cycle multiply, since you can combine Boolean expressions with arithmetic expressions using the much quicker bitwise and (&).
-Phil