Re: Opening an already-connected unit with status='unknown'
From: Richard E Maine (nospam_at_see.signature)
Date: 01/07/05
- Next message: Richard E Maine: "Re: What compiler to use"
- Previous message: Greg Lindahl: "Re: Opening an already-connected unit with status='unknown'"
- In reply to: Toby White: "Opening an already-connected unit with status='unknown'"
- Next in thread: Toby White: "Re: Opening an already-connected unit with status='unknown'"
- Reply: Toby White: "Re: Opening an already-connected unit with status='unknown'"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 07 Jan 2005 10:55:46 -0800
In article <t8voeg19l08.fsf@parabrisas.esc.cam.ac.uk>,
Toby White <tow21@cam.ac.uk> wrote:
> open(unit=13,name="file")
> open(unit=13,name="file",status='unknown')
...
> Should the second open succeed?
Interesting point. I'd say that the standard comes close to
contradicting itself here, but not quite. Close enough that the point is
probably arguable.
> (I presume 9.3.4.2 (f95) is the relevant paragraph)
Well, that's one of the 2. And indeed, that makes it sound like leaving
the status unspecified should be a lot like specifying status='unknown'.
However, see also the 6th para of 9.3.4 in f95. In that para we see
"If the STATUS= specifier is included in such an OPEN statement, it
shall be specified with a value of OLD."
That seems pretty explicit to me. It doesn't say "OLD or UNKNOWN". Thus
you can specify OLD or you can omit the STATUS=, but you can't specify
UNKNOWN.
To read this as other than a direct contradiction of 9.4.2 (which seems
to imply that omission should be equivalent to specifying UNKNOWN), I'd
probably have to use mental gymnastics like saying that UNKNOWN would
have the same meaning as omitting it, if you were allowed to specify
UNKNOWN, but you aren't allowed to do it anyway. If that makes sense.
Note also that 9.4.3.2 describes UNKNOWN as being processor dependent,
so there might be some extra wiggle room there.
-- Richard Maine | Good judgment comes from experience; email: my first.last at org.domain | experience comes from bad judgment. org: nasa, domain: gov | -- Mark Twain
- Next message: Richard E Maine: "Re: What compiler to use"
- Previous message: Greg Lindahl: "Re: Opening an already-connected unit with status='unknown'"
- In reply to: Toby White: "Opening an already-connected unit with status='unknown'"
- Next in thread: Toby White: "Re: Opening an already-connected unit with status='unknown'"
- Reply: Toby White: "Re: Opening an already-connected unit with status='unknown'"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|