Article View: comp.lang.modula2
Article #840Re: Why are the loops so awkward?
From: Fred van.der.Windt
Date: Tue, 12 Jun 1990 14:03
Date: Tue, 12 Jun 1990 14:03
36 lines
1062 bytes
1062 bytes
How about:
PROCEDURE P(VAR S : ARRAY OF CHAR);
VAR
i : CARDINAL;
BEGIN
(* this works: *)
IF S[0] <> CHR(0) THEN
FOR i := 0 TO Length(S) - 1 DO
process(S[i]);
END;
END;
(* this looks nicer: *)
FOR i := 1 TO Length(S) DO
process(S[i-1]);
END;
END P;
> Am I in a grumpy mood without justifiable cause?
I think so ;-)
Fred!
--
uucp: uunet!m2xenix!puddle!2!512!106!Fred.van.der.Windt
Internet: Fred.van.der.Windt@f106.n512.z2.fidonet.org
Technical Details
Message-ID:
<5841.2679DA08@puddle.fidonet.org>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!f106.n512.z2.fidonet.org!Fred.van.der.WindtShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!f106.n512.z2.fidonet.org!Fred.van.der.Windt From: Fred.van.der.Windt@f106.n512.z2.fidonet.org (Fred van.der.Windt) Newsgroups: comp.lang.modula2 Subject: Re: Why are the loops so awkward? Message-ID: <5841.2679DA08@puddle.fidonet.org> Date: 12 Jun 90 14:03:00 GMT Sender: ufgate@puddle.fidonet.org (newsout1.26) Organization: FidoNet node 2:512/106 - Saturn's node, Amsterdam Lines: 36