Re: Array Constructors



Steve Lionel wrote:

(snip)
More or less. Fortran 77 says, for data-implied-do:

"The appearance of an implied-DO-variable name in a DATA statement
does not affect the definition status of a variable of the same name
in the same program unit."

There is no similar text for I/O implied DO and the wording in F77 and
later indicates that it is processed like a normal DO, as noted by
others in this thread.

The rule for normal DO in F66 was that the DO variable was undefined
after the loop terminated normally. If you GOTO out of the loop,
the DO variable kept its value. As I found out somewhere along the
way (I almost sent a bug report to DEC), the END= exit from a READ
statement is NOT like a GOTO out of a real DO loop. The implementation
is allowed to, but not required to, store into the I/O implied DO variable.

-- glen

.