Re: closing unit=5 and unit=6 and print *




Richard E Maine wrote:

1. The standard didn't actually say anything like that. There is a bit
that could possibly be misinterpreted that way, but I believe that would
be a misinterpretation... and the formal interp agrees with me. You are
probably reading the part that says that a file may not be connected to
more than one unit at the same time. The subtle part is in the
distinction between a unit and a unit identifier; the standard is a bit
sloppy about that distinction, but I maintain that * and 6 (for example)
can be two different identifiers for the same unit, just like two
different integer variables with the same value could identify the same
unit. I agree it is a subtle distinction.

I don't believe that subtle distinction is strong enough to allow what
DEC, Cray, and now Sun do. Suppose * and 6 (for example) are
two different identifiers for the same unit. Then closing the unit
idenitified by 6 should close the unit idenified by *, and that does
not happen for those implementations. I could weasel-word my
way around that, but if 6 is used to identify a unit in a subsequent
OPEN statement, it does not change the connection for * in those
implementations. I see no way to weasel-word my way around that.

4. I happen to personally find your interpretation to be inconvenient. I
was surprised when I found that there were compilers that worked that
way.

I also was surprised. Until I saw that DEC Fortran worked that way,
it had not occurred to me that the external unit identified by *
might work that way. It took many requests from users before I
agreed to change the way Sun Fortran works.

Bob Corbett

.