Re: Opening an already-connected unit with status='unknown'

From: Richard E Maine (nospam_at_see.signature)
Date: 01/07/05


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


Relevant Pages

  • Re: S-function Builder and Dynamic Arrays
    ... unknown size (ie a dynamic array) as input. ... column where you are supposed to specify the row size but if this is ... But I doubt the SFunction builder wizard supports this. ...
    (comp.soft-sys.matlab)
  • Re: Type of Data Returned by a Function
    ... returned by my functions is "unknown" in the following syntax: ... I *think* I can specify that by doing something like this: ... The only thing I can think of that might have something to do with what you say are phpdoc comments: ...
    (comp.lang.php)
  • Re: Opening an already-connected unit with status=unknown
    ... Richard E Maine writes: ... I'd say that the standard comes close to ... > contradicting itself here, but not quite. ... > you can specify OLD or you can omit the STATUS=, ...
    (comp.lang.fortran)
  • Re: NULL = NULL not working
    ... >>I have a proc that can specify a price range if its passed in. ... Think of NULL as an unknown value. ...
    (microsoft.public.sqlserver.mseq)
  • Re: Create a new OMF tablespace with OEM
    ... EM will not let you get around having to specify a file name. ... But I think this is more of an oversight than anything else. ... "I can give it to you cheap, quick, and good. ... Now pick two out of the three" - Unknown ...
    (comp.databases.oracle.server)