Commit | Line | Data |
---|---|---|
61212793 C |
1 | |
2 | ||
3 | ||
4 | STRUCT(1) UNIX Programmer's Manual STRUCT(1) | |
5 | ||
6 | ||
7 | ||
8 | N\bNA\bAM\bME\bE | |
9 | struct - structure Fortran programs | |
10 | ||
11 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS | |
12 | s\bst\btr\bru\buc\bct\bt [ option ] ... file | |
13 | ||
14 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
15 | _\bS_\bt_\br_\bu_\bc_\bt translates the Fortran program specified by _\bf_\bi_\bl_\be | |
16 | (standard input default) into a Ratfor program. Wherever | |
17 | possible, Ratfor control constructs replace the original | |
18 | Fortran. Statement numbers appear only where still neces- | |
19 | sary. Cosmetic changes are made, including changing Holler- | |
20 | ith strings into quoted strings and relational operators | |
21 | into symbols (.e.g. ".GT." into ">"). The output is | |
22 | appropriately indented. | |
23 | ||
24 | The following options may occur in any order. | |
25 | ||
26 | -\b-s\bs Input is accepted in standard format, i.e. comments | |
27 | are specified by a c, C, or * in column 1, and con- | |
28 | tinuation lines are specified by a nonzero, nonblank | |
29 | character in column 6. Normally input is in the form | |
30 | accepted by _\bf_\b7_\b7(1) | |
31 | ||
32 | -\b-i\bi Do not turn computed goto statements into switches. | |
33 | (Ratfor does not turn switches back into computed goto | |
34 | statements.) | |
35 | ||
36 | -\b-a\ba Turn sequences of else ifs into a non-Ratfor switch of | |
37 | the form | |
38 | ||
39 | ||
40 | switch | |
41 | { case pred1: code | |
42 | case pred2: code | |
43 | case pred3: code | |
44 | default: code | |
45 | } | |
46 | ||
47 | The case predicates are tested in order; the code | |
48 | appropriate to only one case is executed. This gen- | |
49 | eralized form of switch statement does not occur in | |
50 | Ratfor. | |
51 | ||
52 | -\b-b\bb Generate goto's instead of multilevel break statements. | |
53 | ||
54 | -\b-n\bn Generate goto's instead of multilevel next statements. | |
55 | ||
56 | -\b-t\bt_\bn Make the nonzero integer _\bn the lowest valued label in | |
57 | the output program (default 10). | |
58 | ||
59 | -\b-c\bc_\bn Increment successive labels in the output program by | |
60 | ||
61 | ||
62 | ||
63 | Printed 7/27/90 1Q 1 | |
64 | ||
65 | ||
66 | ||
67 | ||
68 | ||
69 | ||
70 | STRUCT(1) UNIX Programmer's Manual STRUCT(1) | |
71 | ||
72 | ||
73 | ||
74 | the nonzero integer _\bn (default 1). | |
75 | ||
76 | -\b-e\be_\bn If _\bn is 0 (default), place code within a loop only if | |
77 | it can lead to an iteration of the loop. If _\bn is | |
78 | nonzero, admit a small code segments to a loop if oth- | |
79 | erwise the loop would have exits to several places | |
80 | including the segment, and the segment can be reached | |
81 | only from the loop. `Small' is close to, but not equal | |
82 | to, the number of statements in the code segment. | |
83 | Values of n under 10 are suggested. | |
84 | ||
85 | F\bFI\bIL\bLE\bES\bS | |
86 | /tmp/struct* | |
87 | ||
88 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
89 | f77(1) | |
90 | ||
91 | B\bBU\bUG\bGS\bS | |
92 | Struct knows Fortran 66 syntax, but not full Fortran 77. | |
93 | If an input Fortran program contains identifiers which are | |
94 | reserved words in Ratfor, the structured version of the pro- | |
95 | gram will not be a valid Ratfor program. | |
96 | The labels generated cannot go above 32767. | |
97 | If you get a goto without a target, try -\b-e\be .\b. | |
98 | ||
99 | ||
100 | ||
101 | ||
102 | ||
103 | ||
104 | ||
105 | ||
106 | ||
107 | ||
108 | ||
109 | ||
110 | ||
111 | ||
112 | ||
113 | ||
114 | ||
115 | ||
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | ||
124 | ||
125 | ||
126 | ||
127 | ||
128 | ||
129 | Printed 7/27/90 2Q 2 | |
130 | ||
131 | ||
132 |