home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!data.nas.nasa.gov!mustang.mst6.lanl.gov!nntp-server.caltech.edu!draco.macsch.com!convex.is.macsch.com!dnl
- From: dnl@convex.is.macsch.com (David Lombard)
- Subject: Re: Obscure fortran question
- Message-ID: <1992Dec23.224608.14985@draco.macsch.com>
- Sender: usenet@draco.macsch.com (Usenet Poster)
- Organization: MacNeal-Schwendler Corp.
- References: <tubetf0@sgi.sgi.com>
- Date: Wed, 23 Dec 92 22:46:08 GMT
- Lines: 40
-
- In article <tubetf0@sgi.sgi.com> rutt@paradise.mti.sgi.com writes:
- >
- >
- > i = 10
- > do 240 i = 1, identity(i)
- >
-
- In my reading, the value of the expression `identity(i)' should be
- determined _before_ the DO-variable is defined. See 11.10.3 (pg 11-7):
-
- 11.10.3 Executing a DO statement. The effect of executing
- a DO statement is to perform the following steps in
- sequence:
-
- (1) The initial parameter m1, the terminal parameter m2,
- and the incrementation parameter m3 are established
- by evaluating e1, e2, and e3, respectively,
- including, if necessary, conversion to the tyupe of
- the DO-variable according to the rules...
-
- (2) The DO-variable becomes defined with the value of the
- initial parameter m1.
-
- (3) The iteration count is established and is the value
- of the expression
-
- ...
-
- So, since step (1), the evaluation of the control parameters, must
- precede step (2), the assignment of the DO-variable, identity(10)
- should have been executed in step (1).
-
- Regards,
- DNL
-
- MY_COMMENTS = MY_OPINIONS = NOBODY_ELSES;
-
- David N. Lombard The first thing we do, The MacNeal-Schwendler Corp
- dnl@macsch.com Let's kill all the lawyers. 815 Colorado Blvd
- (213) 259-4911 II Henry VI, IV.ii Los Angeles, CA 90041
-