🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1295

Re: for(;;) vs. while(1) is a draw

#1295
From: Paul D. Crowley
Date: Fri, 25 May 1990 20:55
20 lines
1442 bytes
In article <12986@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes:
>"true" is logical.  "1" has to be explained as a special quirk of C.

bph@buengc.bu.edu (Blair P. Houghton) sez in <5907@buengc.BU.EDU>
>As is done long before you get around to presenting `while'
>and `for'.

Well, not necessarily.   In fact, it would surprise me if by the time
you were presenting "for" you'd told people that integers were used to
represent boolean values.  Most people at that level of programming only
have the vaguest idea what a boolean value is anyway. "3<4" people can
cope with;  "3<4 == TRUE" is for mathematicians. "3<4 != 0" is abtruse.

Peeve: why doesn't C have a type "boolean" built in? It seems natural,
and I'm sure there's some compiler somewhere that could use it to
improve executables.

-- 
\/ o\ Paul Crowley aipdc@uk.ac.ed.castle
/\__/ "Trust me, I know what I'm doing" - Sledge Hammer
Technical Details
Message-ID: <4232@castle.ed.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aipdc
References: <5879@buengc.BU.EDU> <12971@smoke.BRL.MIL> <5897@buengc.BU.EDU> <12986@smoke.BRL.MIL> <5907@buengc.BU.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aipdc
From: aipdc@castle.ed.ac.uk (Paul D. Crowley)
Newsgroups: comp.std.c
Subject: Re: for(;;) vs. while(1) is a draw
Message-ID: <4232@castle.ed.ac.uk>
Date: 25 May 90 20:55:14 GMT
References: <5879@buengc.BU.EDU> <12971@smoke.BRL.MIL> <5897@buengc.BU.EDU> <12986@smoke.BRL.MIL> <5907@buengc.BU.EDU>
Reply-To: aipdc@castle.ed.ac.uk (Paul D. Crowley)
Organization: Edinburgh University Computing Service
Lines: 20