From 49d81bc0464417baa5c5655493e21047ff300c6e Mon Sep 17 00:00:00 2001 From: "Brenda S. Baker" Date: Fri, 19 Jan 1979 14:52:30 -0500 Subject: [PATCH] Research V7 development Work on file usr/man/man1/struct.1 Synthesized-from: v7 --- usr/man/man1/struct.1 | 100 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 usr/man/man1/struct.1 diff --git a/usr/man/man1/struct.1 b/usr/man/man1/struct.1 new file mode 100644 index 0000000000..aaa0c8ba39 --- /dev/null +++ b/usr/man/man1/struct.1 @@ -0,0 +1,100 @@ +.TH STRUCT 1 +.SH NAME +struct \- structure Fortran programs +.SH SYNOPSIS +.B struct +[ option ] ... +file +.SH DESCRIPTION +.LP +.I Struct +translates the Fortran program specified by +.I file +(standard input default) +into a Ratfor program. +Wherever possible, Ratfor control constructs +replace the original Fortran. +Statement numbers appear only where still necessary. +Cosmetic changes are made, including changing Hollerith strings +into quoted strings +and relational operators into symbols (.e.g. `.GT.' into `>'). +The output is appropriately indented. +.PP +The following options may occur in any order. +.TP +.B \-s +Input is accepted in standard format, i.e. +comments are specified by a c, C, or * in column 1, and continuation lines +are specified by a nonzero, nonblank character in column 6. +Normally, a statement whose first nonblank character +is not alphanumeric is treated as a continuation. +.TP +.B \-i +Do not turn computed goto statements into +switches. +(Ratfor does not turn switches back +into computed goto statements.) +.TP +.B \-a +Turn sequences of else ifs into a +non-Ratfor switch of the form +.IP +.nf +.ta 5 7 +switch { + case pred1: code + case pred2: code + case pred3: code + default: code + } +.fi +.DT +.IP +The case predicates are tested in order; +the code appropriate to only one case is executed. +This generalized form of switch statement does not +occur in Ratfor. +.TP +.B \-b +Generate goto's instead of multilevel break statements. +.TP +.B \-n +Generate goto's instead of multilevel next statements. +.TP +.TP +.BI \-e n +If +.I n +is 0 (default), +place code within a loop only if it can +lead to an iteration of the loop. +If +.I n +is nonzero, +admit code segments with fewer than +.I n +statements to a loop +if otherwise the loop would have exits to several places including the segment, +and the segment can be reached only from the loop. +.SH FILES +/tmp/struct* +.br +/usr/lib/struct/* +.SH SEE ALSO +f77(1) +.SH BUGS +Struct knows Fortran 66 syntax, but not full Fortran 77 +(alternate returns, IF...THEN...ELSE, etc.) +.br +If an input Fortran program contains identifiers which +are reserved words in Ratfor, the structured +version of the program +will not be a valid Ratfor program. +.br +Extended range DO's generate cryptic errors. +.br +Columns 73-80 are not special even when +.B \-s +is in effect. +.br +Will not generate Ratfor FOR statements. -- 2.20.1