ASA(1) — USER COMMANDS
NAME
asa − convert FORTRAN carriage-control output to printable form
SYNOPSIS
asa [ file... ]
DESCRIPTION
You can use asa to map from FORTRAN output to the printer. That is, map from files or pipes that have FORTRAN carriage-control conventions into a form acceptable to conventional printers.
The first column of FORTRAN output files may contain the standard FORTRAN characters 0, 1, or + to control the printing format. asa replaces such characters by implementation-defined printer-understandable control sequences. Specifically, if the character in the first column is
0 it is replaced by a newline control sequence followed by the rest of the input line.
1 it is replaced by a newpage control sequence followed by the rest of the input line.
+ it is replaced by a control sequence that causes printing to return to the first column of the previous line, where the rest of the input line is printed.
For any other character in the first column of an input line, asa skips the character and prints the rest of the line unchanged.
If asa is called without providing a filename, the standard input is used.
EXAMPLES
The command a.out | asa | lpr converts output from a.out to conform with conventional printers and directs it through a pipe to the printer.
The command asa output
shows the contents of file output on a terminal as it would appear on a printer.
The following program is used in the next two examples:
write(∗,’(" Blank")’)
write(∗,’("0Zero ")’)
write(∗,’("+ Plus ")’)
write(∗,’("1One ")’)
end
Example 1. With actual files:
a.out > MyOutputFile
asa < MyOutputFile | lpr
Example 2. With only pipes: a.out | asa | lpr Both of the above examples produce two pages of output.
Page 1:
Blank
ZeroPlus
Page 2:
One
Sun Release 4.1 — Last change: 28 October 1991