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