Article View: comp.lang.modula2
Article #4601Re: "for" loops (was Re: C++ vs. Modula2)
From: T. William Wells
Date: Sun, 29 Jan 1989 22:57
Date: Sun, 29 Jan 1989 22:57
20 lines
1244 bytes
1244 bytes
In article <1626@csuna.UUCP> abcscagz@csuna.csun.edu (Jeff Boeing) writes:
: Hoo boy, did I ever mess up in my last posting.
: I forgot that a C "for" loop may be executed zero times.
: So, let me rephrase my conviction that a C "for" loop is superfluous
: because it can be replaced by an equivalent "while" loop, NOT an
: equivalent "do ... while" loop:
C is superfluous because it can be replaced by an equivalent assembly
program.
---
The C for loop exists because it encapsulates the common initialize,
test, and update control structure; it does not exist because such
encapsulation can't be written any other way, or to save keystrokes,
or any other such irrelevant reason.
---
Bill
{ uunet!proxftl | novavax } !twwells!bill
Technical Details
Message-ID:
<348@twwells.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!uflorida!novavax!twwells!billReferences:
<INFO-M2%89011219330825@UCF1VM> <739@jupiter.iis.UUCP> <1611@csuna.UUCP> <1626@csuna.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!uflorida!novavax!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.lang.modula2,comp.lang.c Subject: Re: "for" loops (was Re: C++ vs. Modula2) Message-ID: <348@twwells.uucp> Date: 29 Jan 89 22:57:13 GMT References: <INFO-M2%89011219330825@UCF1VM> <739@jupiter.iis.UUCP> <1611@csuna.UUCP> <1626@csuna.UUCP> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 20