ASA Carriage Control Characters
The first character in each record (line) of formatted output defines
a carriage control character to the lineprinter, often called ASA-character,
for a previous name of the US Standardization Organization ANSI. These
have the following meanings
blank New line
+ Not new line (overwriting,
not available on all printers)
0 Double line feed
1 New page
On some printers additional characters are being used, the digits
are often used as vertical tabulators.
NOTE: Output with FORMAT(I5) or F7.3
or 1PE8.2 can cause output of a lot of papers with almost
no printing. The reason is many occurrences of the control character
"1", each indicating a new page. Therefore it is recommended to
give an explicit blank first in all FORMAT:s used for output (if
not another control character is being used). The blank character
is obtained with 1X or ' ' or the obsolete 1H
.
Therefore, never use the same FORMAT for both input
and output.
When using VAX/VMS for output first on a file, which is to be
printed later on paper, it is advisable to use the extension .DAT.
It is only in that case the carriage control characters are being
used automatically (by default).
Using UNIX it is more complicated to utilize the control characters,
it is being done differently by different manufacturers.
Digital Equipment DEC ULTRIX using Fortran 77
- You use the compiler switch -vms
f77 -vms prog.f
and get the control characters removed from the screen output.
- You make the output unto a file which has been opened in a
special non-standard way
OPEN(1, FILE = 'outfile', CARRIAGECONTROL = 'FORTRAN')
and get a file outfile which prints correctly. The command
CARRIAGECONTROL is not standard, and will cause compilation
error on most other systems.
On Digital Equipment UNIX (Alpha) using Fortran 90
- You use the compiler switch -vms
f90 -vms prog.f90
and get the control characters work properly on the screen output.
- You make the output unto a file which has been opened in a
special non-standard way
OPEN(1, FILE = 'outfile', CARRIAGECONTROL = 'FORTRAN')
and get a file outfile which prints correctly. The command
CARRIAGECONTROL is not standard, and will cause compilation
error on most other systems.
On most systems using either Fortran 77 or 90
Last modified: 12 September 1997
boein@nsc.liu.se |