Re: Opening an already-connected unit with status='unknown'
From: Toby White (tow21_at_cam.ac.uk)
Date: 01/07/05
- Next message: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Previous message: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- In reply to: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Next in thread: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Reply: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 07 Jan 2005 19:20:00 +0000
Richard E Maine <nospam@see.signature> writes:
> 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.
Ah - I'd missed that paragraph. That's fairly clear, and I assume the
rule which is intended to apply in this case, notwithstanding the
confusion of 9.3.4.2. (Has any of the wording in this changed for F2003?
I have the committee draft from Sep. 2002, and it seems not to have)
Oh well. I shall add that to my list of Fortran arcana.
-- Dr. Toby White, Dept. of Earth Sciences, Downing Street, Cambridge CB2 3EQ. UK Email: <tow21@cam.ac.uk>
- Next message: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Previous message: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- In reply to: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Next in thread: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Reply: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|