4.4BSD/usr/share/man/cat1/struct.0
STRUCT(1) BSD Reference Manual STRUCT(1)
NNAAMMEE
struct - structure Fortran programs
SSYYNNOOPPSSIISS
ssttrruucctt [ option ] ... file
DDEESSCCRRIIPPTTIIOONN
_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 Hol-
lerith strings into quoted strings and relational opera-
tors into symbols (.e.g. ".GT." into ">"). The output is
appropriately indented.
The following options may occur in any order.
--ss Input is accepted in standard format, i.e. com-
ments are specified by a c, C, or * in column 1,
and continuation lines are specified by a nonzero,
nonblank character in column 6. Normally input is
in the form accepted by _f_7_7(1)
--ii Do not turn computed goto statements into switches.
(Ratfor does not turn switches back into computed
goto statements.)
--aa 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
generalized form of switch statement does not occur
in Ratfor.
--bb Generate goto's instead of multilevel break state-
ments.
--nn Generate goto's instead of multilevel next state-
ments.
--tt_n Make the nonzero integer _n the lowest valued label
in the output program (default 10).
7th Edition 1Q 1
STRUCT(1) BSD Reference Manual STRUCT(1)
--cc_n Increment successive labels in the output program
by the nonzero integer _n (default 1).
--ee_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 a small code segments 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. `Small' is close
to, but not equal to, the number of statements in
the code segment. Values of n under 10 are sug-
gested.
FFIILLEESS
/tmp/struct*
SSEEEE AALLSSOO
f77(1)
BBUUGGSS
Struct knows Fortran 66 syntax, but not full Fortran 77.
If an input Fortran program contains identifiers which are
reserved words in Ratfor, the structured version of the
program will not be a valid Ratfor program.
The labels generated cannot go above 32767.
If you get a goto without a target, try --ee ..
7th Edition 2Q 2