Re: crash report

n...@xxxxxxxxx wrote:
Terence <tbwright@xxxxxxxxx> wrote:

You cannot use unit 1 as a file on disk in most run-time compiled
Fortran code.
In general, do not use units 0 through 3 and it is wiser to not use 4
to 6 either.

Nick wrote:-
No, it isn't. There have been systems where it was, but it is very
dubiously conforming to Fortran 2003 to use the same unit number for
INPUT_UNIT and OUTPUT_UNIT (what you call the keyboard and screen,

Rubbish! There still are today and will be in the future Fortran
compilers where 0 or "*" used as a unit number mean "screen and
keyboard". Mind you, the very first compilers didn't, but all mine

Exact quote from one of my Fortran manuals

" * represents the keyboard and screen, a sequential formatted file,
also known as unit zero".

And that was the first line in the chapter on files and I/O !!!

You can talk about UNIX and F2003 and so on, but the average just-come-
to-Fortran user won't know and won't care about the exceptions or even
(probably) 2003 and later compiler versions, and not only because so
many cost more that the new computers they are using (shame!).

I certainly don't and there just may be one person reading this Forum
with more years of using Fortran. I'll always grant there are many who
know far more about the current compilers that I don't need to use (I
have Intel 9.0 as my latest).

CVF/DFV and Intel compilers all accept unit 0 or the asterisk as do
all the (Intel-based) compilers. As for the other abbove guidlines of
mine; these are the same suggestions made by many experienced Forum
posters over the years - "don't use 1 to 6 as unit numbers, but
especially not 1 to 3".
And when I sugested not use unit zero, I really meant in the sense of
don't specifically OPEN a file as unit zero (I used unit "0" instead
of "*" by habit until quite recently).

If I ever say something works it's because I'm using it. And youl'd
better believe it's in the manual that goes with the compiler as well.
I doubt if "INPUT_UNIT" appears in any of the Fortran manuals I have -
certainly not in the index of three and the bodies of two (the third
is three inches thick and I'm not disposed to check every one of the
page any further).

Don't nit-pick - try to help the new user!


Relevant Pages

  • Re: crash report
    ... Fortran code. ... INPUT_UNIT and OUTPUT_UNIT (what you call the keyboard and screen, ... Mind you, the very first compilers didn't, but all mine ...
  • Re: Posix fortran and the gnu toolchain
    ... So I tried to go in and verify what Richard says, and I'm a little disappointed that I couldn't get the text + x numbers to show. ... know anything about Fortran. ... worry about the possibility of such conflicts; ... Be aware that the details can and do vary among compilers. ...
  • Re: Is it time to legitimise REAL*8 etc?
    ... Some vendors phased out their F77 compilers over 10 ... No need to support a seperate F77 compiler as, ... experience with F77) that the F95 programming is safer than the F77 ... Authors are not chosing more recent Fortran ...
  • Re: code speed moving from fortran 77 compiler to f2003 compiler
    ... familiar with the language, whether certain language features (or their ... sufficiently usable compilers, of free compilers, of already bought ... I think one can safely use Fortran 95 and even many of the Fortran 2003 ... and readability due to the conversion.) ...
  • Re: what is the most suitable Linux platform for Programmers and software developers
    ... C, C++, Perl, Python, Lisp, and a bunch of other languages are supported ... There are FORTRAN compilers, but FORTRAN ... Look at the Linux ...