- #1
- 4
- 0
Most of the examples here are given from the following book,
Michael Kupferschmid, "Classical Fortran: Programming for Engineering and Scientific Applications", Taylor & Francis Group, 2009
The generalized form of READ command is as follows,
READ (unit, format) list
where, the value of 'unit' could be any value ranging from 0-99 or star symbol '*'. Both 5 or * means standard-in (usually keyboards). If the 'format' is *, then the format will be according to the compiler default. However if 'format' is not * , then it will refer the label of the FORMAT statement. Note that the FORMAT statement is used to specify exactly how the input/output will be. The 'list' is the list of variables to be read.
Any of the commands are used to read an input for variable A,
and
are same commands. It means the program will take an input from standard-in (usually keyboard).
Michael Kupferschmid, "Classical Fortran: Programming for Engineering and Scientific Applications", Taylor & Francis Group, 2009
The generalized form of READ command is as follows,
READ (unit, format) list
where, the value of 'unit' could be any value ranging from 0-99 or star symbol '*'. Both 5 or * means standard-in (usually keyboards). If the 'format' is *, then the format will be according to the compiler default. However if 'format' is not * , then it will refer the label of the FORMAT statement. Note that the FORMAT statement is used to specify exactly how the input/output will be. The 'list' is the list of variables to be read.
Any of the commands are used to read an input for variable A,
PHP:
READ (*,*) A
and
PHP:
READ *,A
are same commands. It means the program will take an input from standard-in (usually keyboard).
Last edited: