Article View: comp.lang.modula2
Article #3030Re: Arrays of Records and Sequential File Reading
From: Bill Seurer
Date: Mon, 13 Nov 1995 15:19
Date: Mon, 13 Nov 1995 15:19
28 lines
1456 bytes
1456 bytes
In article <815867570snx@deliah.nemeter.dinoco.DE>, michely@deliah.nemeter.dinoco.DE (Joachim Michely) writes:
|> If you have to deal with "real world data", you often have multiple exits from
|> a loop. The easiest way to do this is LOOP .. END. All other constructs will
|> become very complicated. I think thats the reason LOOP .. END is for.
Definitely. Over time many of my non-FOR loops get switched from WHILEs
and REPEAT/UNTILs to LOOPs. How many times have you seen this in code?
someVar := SomeFunction();
WHILE someVar <> someSpecialValue DO
...whatever...
someVar := SomeFunction();
END (*While*);
With a LOOP this nicely becomes:
LOOP
someVar := SomeFunction();
IF someVar = someSpecialValue THEN
EXIT (*Loop*);
END (*If*);
...whatever...
END (*Loop*);
--
- Bill Seurer ID Tools and Compiler Development IBM Rochester, MN
Business: BillSeurer@vnet.ibm.com Home: BillSeurer@aol.com
Technical Details
Message-ID:
<487nm4$103j@locutus.rchland.ibm.com>Path:
arc1-ca.pugleaf.net!nordruth.rchland.ibm.com!seurerReferences:
<47h0k9$esj@cliff.island.net> <815867570snx@deliah.nemeter.dinoco.DE>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!nordruth.rchland.ibm.com!seurer From: seurer@nordruth.rchland.ibm.com (Bill Seurer) Newsgroups: comp.lang.modula2 Subject: Re: Arrays of Records and Sequential File Reading Date: 13 Nov 1995 15:19:32 GMT Organization: IBM Rochester MN Distribution: world Message-ID: <487nm4$103j@locutus.rchland.ibm.com> References: <47h0k9$esj@cliff.island.net> <815867570snx@deliah.nemeter.dinoco.DE> Reply-To: BillSeurer@vnet.ibm.com NNTP-Posting-Host: nordruth.rchland.ibm.com