1 SFTRAN
SFTRAN is a  structured Fortran  preprocessor developed at JPL and
widely used  in the  "portable software"  community.   It provides
modern control flow directives and automatic indentation of source
listings,  plus optional  run-time  program instrumentation.   The
user documentation is the  SFTRAN3  Programmer's Reference Manual,
JPL Document 1846-98,  available  from the  computer documentation
library in bldg. 125.   A copy is available in the PODS user area.

There are four commands  available to run SFTRAN,  all of which run
the  SFTRAN  preprocessor first:   SFC to Fortran compile using the
NOLIST option, SFCL to Fortran compile with a Fortran listing, SFCD
to Fortran compile with the D_LINES option, and SF3 for interactive
prompting for Fortran options.   Because of its interactive nature,
SF3 is not  convenient for use in a command procedure or batch run.
2 Include
If you use the SFTRAN3 INCLUDE statement,  your text to be included
is read from  Fortran unit 20.   The most  convenient way to handle
this is to put all your INCLUDE segments in a file named FOR020.DAT
so  the  SFTRAN  processor can find  them by  default.   If you use
unit 20 in your run-time programs, however, there may be confusion.
To avoid this,  you can specify  the  name  of  your  INCLUDE  file
explicitly.  Examples:

      $SFC SOURCFILE
      $SFC SOURCFILE INCLFILE.FOR
      $SFC SOURCFILE MYDISK:[MYDIR.SUBDIR]SFINCLUD.FIL

The  first  example  looks  for  FOR020.DAT  in the  current default
directory  if the source program containds any  INCLUDE  statements.
The second  example looks for  INCLFILE.FOR  in the  current default
directory.  The third example specifies the include file completely.
2 Syntax
All the variants of the SFx command have the same syntax:

      $SFx <filename> [ <include-file-spec> ]

where  <filename>  is the filename portion of the input file-spec
(the extension must be .S3I), and <include-file-spec> follows the
usual rules for file naming.  Examples:

      $SFC  MYFILE
      $SFCL INFILE [ABC.DEF]SFINCLUDE.FIL
2 SFC
The SFC command activates the SFTRAN3 processor,  then, if no errors
occur, activates the Fortran compiler with the  /NOLIST  option.  If
it completes normally, it deletes all temporary files, including the
.FOR input to the Fortran compiler.   The indented source listing is
placed in   <input-file>.S3L   and is  NOT  printed unless you do so
explicitly.  Examples: 

      $SFC MYFILE
      $SFC INFILE [ABC.DEF]SFINCLUDE.FIL

The first example uses MYFILE.S3I as input, and if any INCLUDE state-
ments are encountered,  looks for  FOR020.DAT  to satisfy them.   The
output listing is  MYFILE.S3L, and the object file is MYFILE.OBJ. 

The second example is similar, but the INCLUDE statements are
satisfied from the specified file.
2 SFCD
The SFCD command activates the SFTRAN3 processor, then, if no errors
occur,  activates the Fortran compiler with the  D_LINES and  NOLIST
options.  If it completes normally,  it deletes all temporary files,
including  the  .FOR  input  to the Fortran compiler.   The indented
source listing  is placed  in  <input-file>.S3L  and is  NOT printed
unless you do so explicitly.  Examples: 

      $SFCD MYFILE
      $SFCD INFILE [ABC.DEF]SFINCLUDE.FIL

The first example uses MYFILE.S3I as input, and if any INCLUDE state-
ments are encountered,  looks for  FOR020.DAT  to satisfy them.   The
output listing is MYFILE.S3L, and the object file is MYFILE.OBJ.

The second example is similar, but the INCLUDE statements are
satisfied from the specified file.
2 SFCL
The SFCL command activates the SFTRAN3 processor, then, if no errors
occur, activates the  Fortran compiler with the LIST option.   If it
completes normally,  it deletes all  temporary files,  including the
.FOR input to the Fortran compiler.   The indented source listing is
placed in  <input-file>.S3L  and is  NOT  printed  unless  you do so
explicitly.  Examples:

      $SFCL MYFILE
      $SFCL INFILE [ABC.DEF]SFINCLUDE.FIL

The first example uses MYFILE.S3I as input, and if any INCLUDE state-
ments are encountered,  looks for  FOR020.DAT  to satisfy them.   The
output listing is MYFILE.S3L, and the object file is MYFILE.OBJ.  The
compiler will also produce a listing file in MYFILE.LIS .  The second
example is similar, but the INCLUDE statements are satisfied from the
specified file.
2 SF3
The  SF3  command activates the  SFTRAN3  processor,  then prompts for
whether you want to run the Fortran compiler, and for Fortran options.
SF3 does  NOT  delete temporary files, so you should clean up after it
by explicitly  deleting  <input-file>.FOR ,.S3E ,.S3C,  and any others
that  may be  left around.   The indented  source listing is placed in
<input-file>.S3L  and is  NOT  printed  unless  you do so  explicitly.
Examples:

      $SF3 MYFILE
      $SF3 INFILE [ABC.DEF]SFINCLUDE.FIL

The first example uses MYFILE.S3I as input, and if any INCLUDE state-
ments are encountered,  looks for  FOR020.DAT  to satisfy them.   The
output listing is MYFILE.S3L, and the object file is MYFILE.OBJ.  The
second example is similar,  but the  INCLUDE statements are satisfied
from the specified file.
