2.9BSD/usr/man/cat1/struct.1

Compare this file to the similar file:
Show the results in this format:


STRUCT(1)           UNIX Programmer's Manual            STRUCT(1)

NAME
     struct - structure Fortran programs

SYNTAX
     struct [ option ] ...  file

DESCRIPTION
     _S_t_r_u_c_t translates the Fortran program specified by _f_i_l_e
     (standard input default) into a Ratfor program.  Wherever
     possible, Ratfor control constructs replace the original
     Fortran.  Statement numbers appear only where still neces-
     sary.  Cosmetic changes are made, including changing Holler-
     ith strings into quoted strings and relational operators
     into symbols (.e.g. `.GT.' into `>').  The output is
     appropriately indented.

     The following options may occur in any order.

     -s   Input is accepted in standard format, i.e.  comments
          are specified by a c, C, or * in column 1, and con-
          tinuation lines are specified by a nonzero, nonblank
          character in column 6.  Normally, a statement whose
          first nonblank character is not alphanumeric is treated
          as a continuation.

     -i   Do not turn computed goto statements into switches.
          (Ratfor does not turn switches back into computed goto
          statements.)

     -a   Turn sequences of else ifs into a non-Ratfor switch of
          the form:

          switch {
                 case pred1: code
                 case pred2: code
                 case pred3: code
                 default: code
               }

          The case predicates are tested in order; the code
          appropriate to only one case is executed.  This gen-
          eralized form of switch statement does not occur in
          Ratfor.

     -b   Generate goto's instead of multilevel break statements.

     -n   Generate goto's instead of multilevel next statements.

     -e_n  If _n is 0 (default), place code within a loop only if
          it can lead to an iteration of the loop.  If _n is
          nonzero, admit code segments with fewer than _n

Printed 5/16/83                                                 1

STRUCT(1)           UNIX Programmer's Manual            STRUCT(1)

          statements to a loop if otherwise the loop would have
          exits to several places including the segment, and the
          segment can be reached only from the loop.

FILES
     /tmp/struct*
     /usr/lib/struct/*

SEE ALSO
     f77(1)

BUGS
     _S_t_r_u_c_t knows Fortran 66 syntax, but not full Fortran77
     (alternate returns, IF...THEN...ELSE, etc.)
     If an input Fortran program contains identifiers which are
     reserved words in Ratfor, the structured version of the pro-
     gram will not be a valid Ratfor program.
     Extended range DO's generate cryptic errors.
     Columns 73-80 are not special even when -s is in effect.
     Will not generate Ratfor FOR statements.
     Has been known to give core images on large files. Making
     them smaller helps.
     Long computed goto statements are sometimes transformed
     improperly into switches.

Printed 5/16/83                                                 2