I was wondering why True is equal to -1 and not 1. If I remember correctly (back in the days) in C, \"true\" would be equal to 1.
Dim t, f As Integer
I guess to goes back to assembly language where a conditional is translated to a compare cmp
operation and the zero flag (ZF
) is checked. For true expressions the ZF
is not raised, and for false expressions it is. Early Intel processors are like that, but I cannot remember if the Zilog Z80
and the Motorola 8-bit processors had the same convention.