Re: closing unit=5 and unit=6 and print *
- From: "James Giles" <jamesgiles@xxxxxxxxxxxxxxxx>
- Date: Thu, 31 Aug 2006 00:05:53 GMT
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
.
- References:
- closing unit=5 and unit=6 and print *
- From: Dylan Sung
- Re: closing unit=5 and unit=6 and print *
- From: Tim Prince
- Re: closing unit=5 and unit=6 and print *
- From: Richard E Maine
- Re: closing unit=5 and unit=6 and print *
- From: robert . corbett
- Re: closing unit=5 and unit=6 and print *
- From: James Giles
- Re: closing unit=5 and unit=6 and print *
- From: robert . corbett
- closing unit=5 and unit=6 and print *
- Prev by Date: Re: Fortran for new and old Macs on OS X
- Next by Date: Re: best way to use the USE statement
- Previous by thread: Re: closing unit=5 and unit=6 and print *
- Next by thread: Re: closing unit=5 and unit=6 and print *
- Index(es):
Relevant Pages
|