[C programming syle poll] conditionals
chris at umcp-cs.UUCP
chris at umcp-cs.UUCP
Thu Apr 26 17:23:01 AEST 1984
K&R, p.41:
... relational expressions like i > j and logical expressions
connected by && and || are defined to have value 1 if true,
and 0 if false.
So any compiler that generates -1 or 0 for "y == x" is just plain
wrong.
I won't argue about which style is "better"; that's a personal
decision, as far as I'm concerned.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci (301) 454-7690
UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at maryland
More information about the Comp.lang.c
mailing list