Article View: comp.std.c
Article #1275Re: for(;;) vs. while(1) is a draw
From: diamond
Date: Tue, 29 May 1990 00:45
Date: Tue, 29 May 1990 00:45
20 lines
1321 bytes
1321 bytes
In article <1990May25.092150.24611@gdr.bath.ac.uk> exspes@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@tkou02.enet.dec.com
Proposed group comp.networks.load-reduction: send your "yes" vote to /dev/null.
Technical Details
Message-ID:
<1740@tkou02.enet.dec.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!usc!elroy.jpl.nasa.gov!decwrl!shlump.nac.dec.com!tkou02.enet.dec.com!diamondReferences:
<5876@buengc.BU.EDU> <12955@smoke.BRL.MIL> <5879@buengc.BU.EDU> <12971@smoke.BRL.MIL> <1990May25.092150.24611@gdr.bath.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!usc!elroy.jpl.nasa.gov!decwrl!shlump.nac.dec.com!tkou02.enet.dec.com!diamond From: diamond@tkou02.enet.dec.com (diamond@tkovoa) Newsgroups: comp.std.c,comp.lang.c Subject: Re: for(;;) vs. while(1) is a draw Message-ID: <1740@tkou02.enet.dec.com> Date: 29 May 90 00:45:54 GMT References: <5876@buengc.BU.EDU> <12955@smoke.BRL.MIL> <5879@buengc.BU.EDU> <12971@smoke.BRL.MIL> <1990May25.092150.24611@gdr.bath.ac.uk> Reply-To: diamond@tkou02.enet.dec.com (diamond@tkovoa) Followup-To: comp.lang.c Organization: Digital Equipment Corporation Japan , Tokyo Lines: 20