Article View: comp.lang.modula2
Article #851Re: Why are my loops so awkward?
From: Andreas Borchert
Date: Wed, 27 Jun 1990 10:11
Date: Wed, 27 Jun 1990 10:11
21 lines
1176 bytes
1176 bytes
Richard Carter writes: > FOR i := 1 TO Length(s) DO > process(s[i-1]); > END; > > If Length(s) = 0, the loop never executes. The only probelm I can > see is that some compilers might not like the s[i-1] bit. I seem > to recall using a M2 compiler that wouldn't pass a computed index > as a parameter in a procedure call (though, it's been so long, I > coulldn't tell you which one). The M2 compiler you cannot remember is probably the Lilith Modula-2 compiler. In this case the implementation restriction applies for VAR-parameters only. Lilith is word-addressed and thus not able to pass the address of an element of a character array. Andreas Borchert -- borchert@mathematik.uni-ulm.de borchert@dulruu51.bitnet
Technical Details
Message-ID:
<9006271011.AA29952@mathematik.uni-ulm.de>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!ucbvax!MATHEMATIK.UNI-ULM.DE!borchertShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!ucbvax!MATHEMATIK.UNI-ULM.DE!borchert From: borchert@MATHEMATIK.UNI-ULM.DE (Andreas Borchert) Newsgroups: comp.lang.modula2 Subject: Re: Why are my loops so awkward? Message-ID: <9006271011.AA29952@mathematik.uni-ulm.de> Date: 27 Jun 90 10:11:41 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Modula2 List <INFO-M2%UCF1VM.BITNET@PSUVM.PSU.EDU> Organization: The Internet Lines: 21