Interdata_v6/usr/doc/man/man1/ratfor.1
.th RATFOR(I)
.sh NAME
rc - RATFOR compiler
.sh SYNOPSIS
rc [-c] [-f] [-r] [-v] name.r
.sh DESCRIPTION
rc invokes the RATFOR preprocessor on a set of RATFOR
source files. It accepts the following arguments:
.sp
Arguments whose names end with '.r' are taken to be RATFOR source
programs; they are preprocessed into FORTRAN and compiled. Each
subroutine or function 'name' is placed on a separate file 'name'.f
and its object code is put on 'name'.o. The main program is put on
MAIN.f and MAIN.o ; block data subprograms go on 'blockdata'.f and
'blockdata'.o.
The resulting ......o files are linked together onto a file called
.it a.out .
The following flags are interpreted by rc.
.nf
.ta 6
-c Suppress the loading phase of compilation, as does any error.
-f Save FORTRAN intermediate files. Used for debugging only.
-r RATFOR only; dont't try to compile the FORTRAN.
-v Don't list intermediate file names while compiling.
.fi
EXAMPLES:
.in +5
.nf
rc test.r
a.out
The above will compile a RATFOR program on file test.r then
execute the resulting binary on a.out.
.fi
.in -5
Every program should contain the statment:
.nf
include rat.h
.fi
This will include the standard definitions for all the symbols in
upper case as used in Software Tools. To use these symbols you
must type them in in upper case; e.g.
.nf
while((c=getc(c)) != EOF) .......
.fi
To enter the special characters required by RATFOR on your terminal
please follow the following conventions:
.nf
TO ENTER TYPE
not equal !=
{ \\(
} \\)
or !
A \\a or any upper case character
# #
.fi
.sh DIAGNOSTICS
Yes-- it is entirely possible to get diagnostics either
from RATFOR or from FORTRAN. If RATFOR finds errors in your proogram
you will receive the message "syntax errors - please list ratjunk"
on your terminal. If this occurs enter cat ratjunk to get a listing
of both the FORTRAN generated by RATFOR and the error messages. In
these errors the line numbers given refer to lines in your RATFOR
program. If RATFOR does not find any errors in your program he
will call FORTRAN to compile the generated Fortran. If FORT
finds errors it will produce diagnostics directly on your terminal.
The line number in these messages refer to line in the FORTRAN
program which is now on a file called MAIN.f for the main program
or on 'name'.f for subprograms.