Daniel and Nicola Grimwood wrote:
...
> yes I was thinking in terms of 0 and 1. I agree with them not having an
> ordering now that it's been pointed out. [...]
Before C the most common "under the hood" implementation
of logicals I came across was negative means .true. and positive
means .false. That's because almost all hardware had a conditional
branch based on the sign bit of an operand register.
Note also that even in C the definition if "true" is not 1, but anything
non-zero. The relational operators return 1 for "true" results, but
many user-defined tests do not. Nor is the value of "true" even
guaranteed to be an unsigned value.
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
|