Xref: utzoo comp.lang.modula2:1233 comp.lang.c:15875 Path: 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: <739@jupiter.iis.UUCP> <1611@csuna.UUCP> <1626@csuna.UUCP> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 20 Summary: Expires: Sender: Followup-To: Distribution: Keywords: 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