STRUCT(1) UNIX Programmer's Manual STRUCT(1)
struct - structure Fortran programs
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
s
\bst
\btr
\bru
\buc
\bct
\bt [ option ] ... file
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
_
\bS_
\bt_
\br_
\bu_
\bc_
\bt translates the Fortran program specified by _
\bf_
\bi_
\bl_
\be
(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
The following options may occur in any order.
-
\b-s
\bs 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 input is in the form
accepted by _
\bf_
\b7_
\b7(1)
-
\b-i
\bi Do not turn computed goto statements into switches.
(Ratfor does not turn switches back into computed goto
-
\b-a
\ba Turn sequences of else ifs into a non-Ratfor switch of
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
-
\b-b
\bb Generate goto's instead of multilevel break statements.
-
\b-n
\bn Generate goto's instead of multilevel next statements.
-
\b-t
\bt_
\bn Make the nonzero integer _
\bn the lowest valued label in
the output program (default 10).
-
\b-c
\bc_
\bn Increment successive labels in the output program by
Printed 7/9/88 April 29, 1985 1
STRUCT(1) UNIX Programmer's Manual STRUCT(1)
the nonzero integer _
\bn (default 1).
-
\b-e
\be_
\bn If _
\bn is 0 (default), place code within a loop only if
it can lead to an iteration of the loop. If _
\bn is
nonzero, admit a small code segments to a loop if oth-
erwise 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 suggested.
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
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 pro-
gram will not be a valid Ratfor program.
The labels generated cannot go above 32767.
If you get a goto without a target, try -
\b-e
\be .
\b.
Printed 7/9/88 April 29, 1985 2