for(;;) vs. while(1) is a draw
diamond@tkovoa
diamond at tkou02.enet.dec.com
Tue May 29 10:45:54 AEST 1990
In article <1990May25.092150.24611 at gdr.bath.ac.uk> exspes at gdr.bath.ac.uk (P E Smee) writes:
>One benefit of 'for(;;)' over 'while (1)' which I haven't seen
>mentioned is that most (in my experience) versions of 'lint' will
>cheerfully accept 'for(;;)' without comment, while giving a 'constant
>in conditional' warning for 'while(1)'.
#ifdef LINT
for(;;) {
#else
while(1) {
#endif
:-)
(Of course lint is broken. Broken tools were desirable in those days.)
(Follow-ups to comp.lang.c, because this topic does not belong in comp.std.c)
--
Norman Diamond, Nihon DEC diamond at tkou02.enet.dec.com
Proposed group comp.networks.load-reduction: send your "yes" vote to /dev/null.
More information about the Comp.lang.c
mailing list