Path: utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!sri-unix!garth!smryan From: smryan@garth.UUCP (Steven Ryan) Newsgroups: comp.lang.c Subject: Re: "for" loops in C ... Message-ID: <1811@garth.UUCP> Date: 9 Nov 88 21:22:26 GMT References: <867@cernvax.UUCP> Reply-To: smryan@garth.UUCP (Steven Ryan) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 24 >- just like good ol' array indexing in FORTRAN - array(i). Well, why >not? BCPL made it very obvious that a[i] and i[a] are the same; it To an optimiser in a language with real arrays, they are not the same. In such languages, lwb a<=i<=upb a so that the location is constrained to the region labeled a. This permits optimisers to make assumptions about whether two memory references can interfere. >used (uses?) a!i to mean *(a+i). This works fine even for structure >access, until you have strong typing. Guess what BCPL didn't have? I, >personally, IMHO, would be happy with a[next] for structure access or >a.i for array access. Isn't it all really the same and just a matter How would you parse that? Fields and subscripts have different syntax, although the concept are similar, to make context-free parsing possible. -- -- s m ryan -------------------------------------------------------------------------------- As loners, Ramdoves are ineffective in making intelligent decisions, but in groups or wings or squadrons or whatever term is used, they respond with an esprit de corps, precision, and, above all, a ruthlessness...not hatefulness, that implies a wide ranging emotional pattern, just a blind, unemotional devotion to doing the job.....