C Style (Was Re: == vs =)
hutchson at convex.UUCP
hutchson at convex.UUCP
Sat May 7 03:31:00 AEST 1988
If you must take Fortran in a c newsgroup, at least take Fortran, not some
brain-damaged non-error-checking dialect.
The current ANSI standard(x3.9-1978,"fortran-77") does not allow one to know
the representation of the logical values .true. and .false. (except that it
fits in the same space in memory as an integer value), so each
implementor chooses his own. I have seen at least these:
- sign bit==1 is true, sign bit==0 is false.
- lsb==1 is true, lsb==0 is false.
- any non-zero value is true, zero is false.
- any non-zero is considered true, .true. is canonically all one bits
- any non-zero is considered true, .true. is canonically==(int) 1
Reversing the meaning and representation of each of these would be equally
valid.
More information about the Comp.lang.c
mailing list