Path: 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 Organization: The Internet Lines: 21 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