SF3 1L "10 August 1986"

Table of contents


NAME

sf3 - a preprocessor for the structured FORTRAN language SFTRAN3

SYNOPSIS

sf3 [-c] [-d] [-f] [-h] [-i:num] [-k] [-l] [-m:num] [-n] [-p] [-r] [-w:num] file1 [file2, ...]

DESCRIPTION

Sf3 assumes that the file file*.sf3 contains code written in SFTRAN3, a structured FORTRAN-like language (if a filename has no extension, .sf3 is assumed). FORTRAN code is produced and placed in file*.f. A log file is placed in file*.sfl. If option -f is employed, object (file*.o) files are also produced. File dates and times are compared to determine whether to preprocess the files file*.sf3 or simply to run the f77 compiler (this action may be overriden by the -r option).

The global variables SF3FLAGS and FFLAGS may be used to provide switches for sf3 and f77 as used inside sf3. In addition, if the file sf3.opt exists in the current or HOME directory, its contents will be appended to the command line. Since options are scanned from left to right, SF3FLAGS values will override any provided in the sf3.opt file.

This program is distributed with the <PLOT79> system.


OPTIONS

-c
produce CDC-style code for READ/WRITE END and ERR parameters.
-d
debug; embed SFTRAN3 code as comments in FORTRAN code output.
-f
invoke the Fortran compiler on the output *.f files; compiler options may be supplied in the FFLAGS global variable.
-h
display a help file and terminate immediately.
-i:num
set structure indentation to num (0 to 9).
-k
keep *.f files after a successful compilation. By default, they are deleted. If compilation fails, they are still preserved.
-l
set the LINEUP option which connects structure begin/end with dotted lines in the *.sfl files.
-m:num
set maximum lines per page to num (suggested: 58 for 6 lpi and 80 for 8 lpi); ignored when prettyprinting.
-n
inhibit production of *.sfl files.
-p
prettyprinted source code sent to *.sfl files instead of a normal listing.
-r
reprocess everything, even if *.f or *.o files are newer than .sf3 files.
-w:num
set *.sfl file line width to num (72 to 120).

EXAMPLE

The following would take the files form the current directory matching the patterns a*.sf3 and *bar*.sf3, produce FORTRAN code files, invoke f77 to produce object files, produce log files of 72 column width, and retain the FORTRAN files.

sf3  -w:72  -k  -f  a*.sf3  *bar*.sf3


FILES

/usr/local/plot79/sf3dir/*
files required to make sf3 (includes executable file)
/usr/local/plot79/sf3
shell script
/usr/local/plot79/define
various environment definitions, an appropriate subset of which should be placed in the user's .cshrc or .profile file

SEE ALSO

document (1L), drawit(1L), grapht(1L), graph3t(1L), lptops(1L), pfort(1L), piechtt(1L), plot79-intro(1L), plot79(1L), pluto(1L), pretty(1L), rdinfo(1L), slides(1L), tekalw(1L), tkvecs(1L), tmacro(1L), world(1L)

SFTRAN/3 Installation Guide. Nelson H. F. Beebe. 1980.

SFTRAN3 Programmer's Reference Manual (Jet Propulsion Laboratory Document no. 1846-98, Dec. 1, 1978).


AUTHOR

Nelson H. F. Beebe, Ph.D.

Center for Scientific Computing

South Physics Building

University of Utah

Salt Lake City, UT 84112

Tel: (801) 581-5254

(Manual page by R. P. C. Rodgers, Computer Applications in Laboratory Medicine Project, UCSF, San Francisco, CA 94143).