BSD 3 development
[unix-history] / usr / man / man1 / ratfor.1
CommitLineData
e6817382
BJ
1.TH RATFOR 1
2.SH NAME
3ratfor \- rational Fortran dialect
4.SH SYNOPSIS
5.B ratfor
6[ option ... ]
7[ filename ... ]
8.SH DESCRIPTION
9.I Ratfor
10converts a rational dialect of Fortran into ordinary irrational Fortran.
11.I Ratfor
12provides control flow constructs essentially identical to those in C:
13.TP
14statement grouping:
15.nf
16{ statement; statement; statement }
17.TP
18decision-making:
19if (condition) statement [ else statement ]
20.br
21switch (integer value) {
22 case integer: statement
23 ...
24 [ default: ] statement
25}
26.TP
27loops:
28while (condition) statement
29for (expression; condition; expression) statement
30do limits statement
31repeat statement [ until (condition) ]
32break
33next
34.LP
35and some syntactic sugar to make programs easier to read and write:
36.TP
37free form input:
38multiple statements/line; automatic continuation
39.TP
40comments:
41# this is a comment
42.TP
43translation of relationals:
44>, >=, etc., become .GT., .GE., etc.
45.TP
46return (expression)
47returns expression to caller from function
48.TP
49define:
50define name replacement
51.TP
52include:
53include filename
54.PP
55.fi
56.I Ratfor
57is best used with
58.IR f77 (1).
59.SH "SEE ALSO"
60f77(1)
61.br
62B. W. Kernighan and P. J. Plauger,
63.IR "Software Tools" ,
64Addison-Wesley, 1976.