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



robert.corbett@xxxxxxx wrote:
James Giles wrote:

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.

Suppose that * and 6 (for example) were two different identifiers
for a different units both of which (by default) talk to an
interactive terminal. Since that's not a file, there's no violation
of the rule about two units connecting to the same file. So,
closing 6 and reopening it need not change the connection for *.

The Fortran standard has no concept of an interactive terminal.

You asked for weasel-words. The fact that the Standard has no
concept of interactive terminal makes the weasel-word explanation
I gave even more convincing. Something beyond the scope of
the standard is the ultimate weasel.

[...] The DEC/Compaq/HP implementation (I don't know if the
behavior has carried over to Intel's implementation), Cray's
implementation, and Sun's implementation treat the units identified
by one of the uses of * and 6 as if they are the same unit initially,
but as different units if the unit identified by 6 is closed.

Then I agree that those are bad *if* that initial connection was a file.

--
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare


.



Relevant Pages

  • Re: closing unit=5 and unit=6 and print *
    ... it does not change the connection for * in those ... Suppose that * and 6 were two different identifiers ... there's no violation of the rule ... The Fortran standard has no concept of an interactive terminal. ...
    (comp.lang.fortran)
  • Re: closing unit=5 and unit=6 and print *
    ... I don't believe that subtle distinction is strong enough to allow what ... two different identifiers for the same unit. ... it does not change the connection for * in those ... there's no violation of the rule ...
    (comp.lang.fortran)