Re: Opening an already-connected unit with status='unknown'
From: Greg Lindahl (lindahl_at_pbm.com)
Date: 01/07/05
- Next message: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Previous message: Greg Lindahl: "Re: What compiler to use"
- In reply to: Toby White: "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: 7 Jan 2005 10:52:27 -0800
In article <t8voeg19l08.fsf@parabrisas.esc.cam.ac.uk>,
Toby White <tow21@cam.ac.uk> wrote:
>program status
> open(unit=13,name="file")
>
> open(unit=13,name="file",status='unknown')
>end program
FILE= is standard-conforming, NAME= is an extension.
The F2003 standard says this is illegal in section 9.4.5:
30 If the file to be connected to the unit is the same as the file to which the unit is connected, only the
31 specifiers for changeable modes (9.4.1) may have values different from those currently in effect. If the
32 POSITION= specifier appears in such an OPEN statement, the value specified shall not disagree with
33 the current position of the file. If the STATUS= specifier is included in such an OPEN statement, it shall
34 be specified with the value OLD.
The easy way to avoid this is to CLOSE the unit before opening it again.
-- greg
- Next message: Richard E Maine: "Re: Opening an already-connected unit with status='unknown'"
- Previous message: Greg Lindahl: "Re: What compiler to use"
- In reply to: Toby White: "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
|