C programming syle poll

ShanklandJA jas at drutx.UUCP
Thu Apr 26 06:19:25 AEST 1984


Relops and equality ops are guaranteed to return 1 (not just
any non-zero value) if the relation is true and 0 if it is false.
Thus, if variable x has the value 5, then the expression

(x == 5)

has type integer and value 1 (cf. K&R, pp. 189-190).

Jim Shankland
..!ihnp4!druxy!jas



More information about the Comp.lang.c mailing list