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