Re: command line input and output
- From: "Colin Watters" <qolin.see_signature@xxxxxxxxxxxxx>
- Date: Fri, 10 Feb 2006 20:09:20 -0000
"Richard E Maine" <nospam@xxxxxxxxxxxxx> wrote in message
news:1hahlr6.1f9bh1k29q2pmN%nospam@xxxxxxxxxxxxxxxx
James Van Buskirk <not_valid@xxxxxxxxxxx> wrote:are
"Richard E Maine" <nospam@xxxxxxxxxxxxx> wrote in message
news:1hahfzp.jhb4t91xnmx4wN%nospam@xxxxxxxxxxxxxxxx
The "without an open statement" bit is another matter entirely. Do you
have some particular objection to open statements? That's what they
http://www.bitsavers.org/pdf/cdc/6x00/fortran/60174900F_FTN_2.3_Ref_Jul72.pdfor. There sure isn't any other way for this or any other compiler to
guess that units 11 and 12 are what you have in mind.
You are perhaps forgetting
f
p. 07-03 and pp. J-07 and J-08?
Nah. I remember that stuff. Been there. But I consider it just a pre-f77
rough equivalent to an OPEN statement. It is something in the Fortran
code that connects the unit number with the "file name", which is the
most fundamental function of OPEN (though OPEN also has many other
details). Unless *SOMETHING*, whether spelled "open" or not, mentions
the numbers 11 and 12, or unless you manage to find a system where those
are the default numbers (I haven't run into that one, but it could
happen in theory), it ain't going to happen.
....um, actually, I have used a compiler that would allow this to happen, and
it was a *REAL* pita.
You would execute a read statement on a unit that wasn't open, and the
compiler's run-time library ..er.. "helpfully" looked at the command line,
extracted an "appropriate" argument (usually the first), and did the
equivalent of an OPEN for you. Trouble was the first argument was often
something not intended to be a filename, so you got a totally unrelated
error concerning the inability to open a file with a strange name.
Alternatively the first argument was a legal filename but it didn't exist,
but that didn't stop the RTL creating an empty file, opening it for you,
then returning to the READ statement... which promptly gave you an
end-of-file on the READ, i.e. another unrelated and totally misleading
error. Or the file did exist so you wind up reading from the wrong file, or
in the case of a WRITE statement, trashing it. If there were no command line
args, you got a message to the console asking you to type in the name of the
file you wanted to open, which, when your code was in a DLL, caused the
program to hang.
"Which compiler", I hear you ask. Ah... Microsoft Powerstation 4.0.
The evidence is in any Compaq Fortran installation: see
project/settings/Fortran/Compatability, Powerstation 4.0 Compatability
Options, Filenames from Command Line.
--
Qolin
Email: my qname at domain
Domain: qomputing dot demon dot co dot uk--
.
- Follow-Ups:
- Re: command line input and output
- From: Kevin G. Rhoads
- Re: command line input and output
- From: Richard E Maine
- Re: command line input and output
- References:
- command line input and output
- From: nk
- Re: command line input and output
- From: Richard E Maine
- Re: command line input and output
- From: James Van Buskirk
- Re: command line input and output
- From: Richard E Maine
- command line input and output
- Prev by Date: Re: Pointers to procedures in Intel Fortran
- Next by Date: Re: Pointers to procedures in Intel Fortran
- Previous by thread: Re: command line input and output
- Next by thread: Re: command line input and output
- Index(es):
Relevant Pages
|