On Dec 16, 4:42 pm, Terence <tbwri...@cantv.net> wrote:
> First, I'm not happy with the use of unit=1.
> For historic reasons you should avoid using units 1 through 3 and
> possibly 1 through 5.
> Unit 0 is the keyboard also referred to a asterisk,
Bad advice. Unit 0 is in most cases the standard error device
(stderr). If you write to it, the output may show up on your screen,
Reading from it will usually cause an error.
> Unit 1 is usually the error listing unit
> Unit 2 is usually the printing unit (and so on, for punch units from
> the "good old days")
>
> For input from the keyboard , or output to the screen, you should use
> "*" or "0"
Bad advice. Input from and output to the same unit is never a good
idea. Input from the standard error device (unit=0) fails with most
compilers.
unit=5 is the standard input, usually associated with the user's
keyboard same as unit=* for input
unit=6 is the standard output, usually associated with the user's
screen same as unit=* for output
Disagree. Unit zero is almost always equivalent to "*" which is
standard for keyboard in and screen out.
If you DON'T want to write to screen than use unit 2 for a print file
(which was almost always, [again], a printer; or any other number over
6), properly named of course.
The use of 5 and 6 as you describe is mainly IBM derived. There are
others. But keeping clear of 0 through 6 is a good idea for persons
new to the history of Fortran.
I always used unit zero since 1960, but have more recently switched to
"*" for keyboard/screen and started to modify old code.
On Dec 27, 2:45 am, Terence <tbwri...@cantv.net> wrote:
> Disagree. Unit zero is almost always equivalent to "*" which is
> standard for keyboard in and screen out.
Try reading from unit zero with something other than an old version of
MS Fortran