🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #995

Re: do...while vs. repeat...until

#995
From: Karl Heuer
Date: Mon, 26 Mar 1990 00:09
18 lines
1514 bytes
In article <MEISSNER.90Mar24084404@curley.osf.org> meissner@osf.org (Michael Meissner) writes:
>In article <4879@ganymede.inmos.co.uk> mph@lion.inmos.co.uk (Mike Harrison) writes:
>|>To take a concrete example, let's ignore the existence of <ctype.h> and
>|>suppose that we want to test whether or not a given character is a lowercase

Watch those attributions!  Mike H. didn't say that; I did.

>Three things: [why (c >= 'a' && c <= 'z') is an imperfect test]

Agreed.  What I said above was shorthand for "for the sake of this example,
let's ignore the fact that <ctype.h> exists and is probably a better tool for
the job."

In any case, my point stands: `until' seems to be better than `while', for
most of those test-at-bottom loops where the condition is complex enough to
make a difference.

Karl W. Z. Heuer (karl@ima.ima.isc.com or harvard!ima!karl), The Walking Lint
Technical Details
Message-ID: <16275@haddock.ima.isc.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!att!ima!haddock!karl
References: <16188@haddock.ima.isc.com> <9130009@hpavla.AVO.HP.COM> <OVB2S3Bxds13@ficc.uu.net> <16249@haddock.ima.isc.com> <4879@ganymede.inmos.co.uk> <MEISSNER.90Mar24084404@curley.osf.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!att!ima!haddock!karl
From: karl@haddock.ima.isc.com (Karl Heuer)
Newsgroups: comp.lang.misc
Subject: Re: do...while vs. repeat...until
Message-ID: <16275@haddock.ima.isc.com>
Date: 26 Mar 90 00:09:15 GMT
References: <16188@haddock.ima.isc.com> <9130009@hpavla.AVO.HP.COM> <OVB2S3Bxds13@ficc.uu.net> <16249@haddock.ima.isc.com> <4879@ganymede.inmos.co.uk> <MEISSNER.90Mar24084404@curley.osf.org>
Reply-To: karl@haddock.ima.isc.com (Karl Heuer)
Organization: Interactive Systems, Cambridge, MA 02138-5302
Lines: 18