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