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