Re: command line input and output





"Richard E Maine" <nospam@xxxxxxxxxxxxx> wrote in message
news:1hahlr6.1f9bh1k29q2pmN%nospam@xxxxxxxxxxxxxxxx
James Van Buskirk <not_valid@xxxxxxxxxxx> wrote:

"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
are
for. 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


http://www.bitsavers.org/pdf/cdc/6x00/fortran/60174900F_FTN_2.3_Ref_Jul72.pd
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--


.



Relevant Pages

  • Re: ANNOUNCE: DJGPP port of GNU Sed 4.2 uploaded.
    ... This is a port of GNU Sed 4.2 to MSDOS/DJGPP. ... =A0 to comp.os.msdos.djgpp or <dj DOT DOT DOT AT delorie DOT com>. ... filename generation is certainly broken. ... If a backup prefix ...
    (comp.os.msdos.djgpp)
  • Re: Changing Uppercase filenames into Lowercase
    ... uppercase filename to a lowercase filename, ... foundfile = f$searchcommand line. ... Based on a command procedure by Willem Grooters which was ...
    (comp.os.vms)
  • Re: Pass command line file name parameter
    ... Then the document class has a copy of the filename, ... No need to access the original command line at all. ... want the user to see all the labels as they would be printed. ... filename or any other variable of your CWinApp class. ...
    (microsoft.public.vc.mfc)
  • Re: Rights problem - Even the administrator is locked out, but I dont see why
    ... You can issue the command like this: ... will 68 at mtco dot com ... will dot pittenger1 at gmail dot com (use this address for large ... The permission structure for the Collection folder ...
    (microsoft.public.windowsxp.general)
  • Re: CStdioFile::Open gives error "No error occurred"
    ... I would avoid GetErrorMessage and just use FormatMessage on the error code itself, ... presume this is *not* the filename you planned to open, so why are you using m_lpCmdLine? ... there is a serious question here as to whether or not the command line has any ... Use the debugger, it is a very useful tool. ...
    (microsoft.public.vc.mfc)