Commit | Line | Data |
---|---|---|
e6817382 BJ |
1 | .TH STRUCT 1 |
2 | .SH NAME | |
3 | struct \- structure Fortran programs | |
4 | .SH SYNOPSIS | |
5 | .B struct | |
6 | [ option ] ... | |
7 | file | |
8 | .SH DESCRIPTION | |
9 | .LP | |
10 | .I Struct | |
11 | translates the Fortran program specified by | |
12 | .I file | |
13 | (standard input default) | |
14 | into a Ratfor program. | |
15 | Wherever possible, Ratfor control constructs | |
16 | replace the original Fortran. | |
17 | Statement numbers appear only where still necessary. | |
18 | Cosmetic changes are made, including changing Hollerith strings | |
19 | into quoted strings | |
20 | and relational operators into symbols (.e.g. ".GT." into ">"). | |
21 | The output is appropriately indented. | |
22 | .PP | |
23 | The following options may occur in any order. | |
24 | .TP | |
25 | .B \-s | |
26 | Input is accepted in standard format, i.e. | |
27 | comments are specified by a c, C, or * in column 1, and continuation lines | |
28 | are specified by a nonzero, nonblank character in column 6. | |
29 | Normally input is in the form accepted by | |
30 | .IR f77 (1) | |
31 | .TP | |
32 | .B \-i | |
33 | Do not turn computed goto statements into | |
34 | switches. | |
35 | (Ratfor does not turn switches back | |
36 | into computed goto statements.) | |
37 | .TP | |
38 | .B \-a | |
39 | Turn sequences of else ifs into a | |
40 | non-Ratfor switch of the form | |
41 | .IP | |
42 | .nf | |
43 | .ta 5 7 | |
44 | switch | |
45 | { case pred1: code | |
46 | case pred2: code | |
47 | case pred3: code | |
48 | default: code | |
49 | } | |
50 | .fi | |
51 | .DT | |
52 | .IP | |
53 | The case predicates are tested in order; | |
54 | the code appropriate to only one case is executed. | |
55 | This generalized form of switch statement does not | |
56 | occur in Ratfor. | |
57 | .TP | |
58 | .B \-b | |
59 | Generate goto's instead of multilevel break statements. | |
60 | .TP | |
61 | .B \-n | |
62 | Generate goto's instead of multilevel next statements. | |
63 | .TP | |
64 | .BI \-t n | |
65 | Make | |
66 | the nonzero integer | |
67 | .I n | |
68 | the lowest valued label in the output program | |
69 | (default 10). | |
70 | .TP | |
71 | .BI \-c n | |
72 | Increment successive labels | |
73 | in the output program | |
74 | by the nonzero integer | |
75 | .I n | |
76 | (default 1). | |
77 | .TP | |
78 | .BI \-e n | |
79 | If | |
80 | .I n | |
81 | is 0 (default), | |
82 | place code within a loop only if it can | |
83 | lead to an iteration of the loop. | |
84 | If | |
85 | .I n | |
86 | is nonzero, | |
87 | admit a small code segments to a loop | |
88 | if otherwise the loop would have exits to several places including the segment, | |
89 | and the segment can be reached only from the loop. | |
90 | `Small' is close to, but not equal to, the | |
91 | number of statements in the code segment. | |
92 | Values of n under 10 are suggested. | |
93 | .SH FILES | |
94 | /tmp/struct* | |
95 | .br | |
96 | /usr/lib/struct/* | |
97 | .SH SEE ALSO | |
98 | f77(1) | |
99 | .SH BUGS | |
100 | Struct knows Fortran 66 syntax, but not full Fortran 77. | |
101 | .br | |
102 | If an input Fortran program contains identifiers which | |
103 | are reserved words in Ratfor, the structured | |
104 | version of the program | |
105 | will not be a valid Ratfor program. | |
106 | .br | |
107 | The labels generated cannot go above 32767. | |
108 | .br | |
109 | If you get a goto without a target, try | |
110 | .B \-e . |