.MH "Appendix F -- Command Line Syntax"
'Rp' provides a rich set of processing options to allow the
user much flexibility and control over the code which is
produced.  The command line syntax is as follows:
.sp
.nf
.in +5
rp [-{a | b | c | d | f | g | h | l | m | p | s | t | v | y}]
   [-o <output_file>] {<input_file>} [-x <translation file>]
.sp
.fi
The following is a full description of each option:
.sp
.in +5
.ta 6
.tc \
.ti -5
a\Abort all active shell programs if any errors were encountered
during preprocessing.
This option is useful in shell programs like 'rfl' that wish to
inhibit compilation and loading if preprocessing failed.
By default, this option is not selected;
that is, errors in preprocessing do not terminate active
shell programs.
.sp
.ti -5
b\Do not map long indentifiers or identifiers containing upper case
letters into unique six character Fortran identifiers.
This option is useful if your Fortran compiler will accept names
longer than six characters.
.sp
.ti -5
c\Include statement-count profiling code in the generated Fortran.
When this option is selected, calls to the library routines
'c$init', 'c$incr', and 'c$end' will be placed (unobtrusively)
in the output code.
When the preprocessed program is run, it will generate a file named
"_st_count" containing execution frequencies for each line of
source code.
The utility program 'st_profile' may then be used to combine
source code and statement counts to form a readable report.
.sp
.ti -5
d\Inhibit generation of the long-name dictionary.
Normally, a dictionary listing all long names used in the
Ratfor program along with their equivalent short forms is placed
at the end of the generated Fortran as a series of comment
statements.
This option prevents its generation.
.sp
.ti -5
f\Suppress automatic inclusion of standard definitions file.
Macro definitions for the manifest constants used throughout
the Subsystem reside in the file "=incl=/swt_def.r.i".
'Rp' will process these definitions automatically, unless the
"-f" option is specified.
.sp
.ti -5
g\Make a second pass over the code and remove GOTOs to GOTOs
generated in Ratfor control structures.  Use of this option
lengthens preprocessing time significantly, but can result
(sometimes) in a 2-5% speedup of the object program.
.sp
.ti -5
h\Produce Hollerith-format string constants rather than quoted
string constants. This option useful in producing character
strings in the proper format needed by your Fortran compiler.
.sp
.ti -5
l\Include Ratfor line numbers in the sequence number field of the
Fortran output.
This may be useful in tracking down the Ratfor statement that caused
a Fortran syntax error.
By default, no sequence field is generated.
.sp
.ti -5
m\Map all identifiers to lower case.
When this option is selected, 'rp' considers the upper case letters
equivalent to the corresponding lower case letters,
except inside quoted strings.
.sp
.ti -5
p\Emit subroutine profiling code.
When this option is selected, 'rp' places calls to the library
routines 't$entr', 't$exit', and 't$clup' in the Fortran output,
and creates a text file named "timer_dictionary" containing the
names of all subprograms seen by the preprocessor.
When the profiled program is run, a file named "_profile" is
created that contains timing measurements for each subprogram.
The utility program 'profile' may then be used to print a report
summarizing the number of times each subprogram was called and
the total time spent in each.
.sp
.ti -5
s\Short-circuit all logical conditions.
The order of evaluation of logical operands in Fortran is unspecified;
that is, in the expression "a&b" there is no guarantee that "a" will
be evaluated before "b".
Occasionally this creates inconveniences; one would like to say
something like "if(i>1&array(i)~=0)...".
'Rp' supplies the short-circuit logical operators "&&" and "||"
(read "andif" and "orif") for these occasions.
Both operators evaluate their left operands; if the value of
the logical expression is predictable solely on the basis of
the value of the left operand, then the right operand remains
unevaluated and the correct expression value is yielded.
Otherwise the right operand is evaluated and the proper expression
value is determined.
The "-s" option may be used to automatically convert all
"logical and" operators in a program to "andifs," and all "logical
or" operators to "orifs."
In addition to improving program portability, this option may also
reduce execution time.
By default, however, this option is not in effect.
.sp
.ti -5
t\Trace subprograms.
When a program preprocessed with the "-t" option is run,
an indented trace of the subprograms encountered will be printed
on ERROUT.
This trace output is generated by calls to the library routine
't$trac' that are inserted automatically by 'rp'.
.sp
.ti -5
v\Output "standard" Fortran. This option causes 'rp' to generate only
standard Fortran constructs (as far as we know).  This option
does not detect non-standard Fortran usage in Ratfor source code;
it only prevents 'rp' from generating non-standard constructs in
implementing its data and control structures.
Programs preprocessed with this option
are slightly larger and slower; the intermediate Fortran and binary
files are approximately 10% larger.
.sp
.ti -5
x\Translate character codes.  'Rp' uses the character correspondences
in the <translation[bl]file> to convert characters into integers
when it builds Fortran DATA statements containing EOS-terminated
or PL/I strings.  If the option is not specified, 'rp' converts
the characters using the native Prime character set.
The format of the translation file is documented below.
.sp
.ti -5
y\Do not output "call[bl]swt".  This option keeps
'rp' from generating "call swt" in place of all "stop" statements.
.in -10
.pp
The remainder of the command line is used to specify the names
of the Ratfor input file(s) and the Fortran output file.
If the "-o" option, followed by a filename, is selected, then
the named file is used for Fortran output.
Any remaining filenames are considered Ratfor source files.
If no other file names are specified, standard input is read.
If the "-o" option is not specified, then the output filename
is constructed from the first input filename by changing a
".r" suffix (if present) to ".f".
If the ".r" suffix is not present, the output filename is
the input filename followed by the suffix ".f".
.pp
The format of the translation file used with the "-x" option
is as follows.
Each line contains descriptions of two characters:
the Prime native character to be replaced, and the character value
to replace it.
These descriptions may be any one of the following:  a single
non-blank Prime ASCII character, a number in a format
acceptable to 'gctoi' (must be more than one digit),
or an ASCII mnemonic acceptable to 'mntoc'.
In addition, the character to be replaced may also
be the mnemonic "EOS" to indicate that the value of the end-of-string
indicator is to be changed.  For example, here is a portion of
the table for converting the EBCDIC character set:
.sp
.in +5
.nf
A 16rc1
B 16rc2
...
Z 16re9
0 16rf0
...
9 16rf9
SP 16r40
.in -5
.fi
.sp
