Article View: comp.lang.modula2
Article #3019Re: Arrays of Records and Sequential File Reading
From: Joachim Michely
Date: Wed, 08 Nov 1995 21:52
Date: Wed, 08 Nov 1995 21:52
31 lines
2027 bytes
2027 bytes
jthorpe@island.net writes in article <47h0k9$esj@cliff.island.net>: > > In <47a4vn$s5g@grid.Direct.CA>, rleroux@direct.ca (robert leroux) writes: > >Thanks, I managed to get it happening just after the last post using a REPEAT > >.. .. UNTIL loop. I am only working at getting the ARRAY of the date field > >working then I should be quite well off. I have an idea on how to address the > >Date filed and print out the dates per book depending on how many copies of the > >particular book is available, but I believe using the CASE statement, I would have > >to read in my 'copi' field as a CHAR so that I can compare it to the current > >copi that is read into the record. I am going to try to address this problem with > >an IF...THEN statement tomorrow first, otherwise I think reading in the copi field as > >a CHAR instead of a Str should solve my problem. > > > > The purists will kill me for this, but the LOOP END; EXITing when a hit is > made is a very useful tool. The academics will say it's crude and you can do > the same thing with either REPEAT UNTIL or DO WHILE but there are lots of > times when one hasn't the time or the inclination to struggle through one or > the other. > > Jim T. > 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. Joachim Michely, Steinkaule 50, 53757 St-Augustin, Germany Voice/Fax : ++49-(0)2241-337938 ( and answering machine ) Internet : michely@nemeter.dinoco.DE CompuServe : 100024,2476
Technical Details
Message-ID:
<815867570snx@deliah.nemeter.dinoco.DE>Path:
arc1-ca.pugleaf.net!nemeter.dinoco.de!deliah!michelyReferences:
<47h0k9$esj@cliff.island.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!nemeter.dinoco.de!deliah!michely From: michely@deliah.nemeter.dinoco.DE (Joachim Michely) Newsgroups: comp.lang.modula2 Subject: Re: Arrays of Records and Sequential File Reading Distribution: world Message-ID: <815867570snx@deliah.nemeter.dinoco.DE> References: <47h0k9$esj@cliff.island.net> Date: Wed, 08 Nov 95 21:52:50 GMT Organization: CCP Koeln