1RATFOR(1) General Commands Manual RATFOR(1)
2
3
4
6 ratfor - rational Fortran dialect
7
9 ratfor [ option ... ] [ filename ... ]
10
12 Ratfor converts a rational dialect of Fortran into ordinary irrational
13 Fortran. Ratfor provides control flow constructs essentially identical
14 to those in C:
15
16 statement grouping:
17 { statement; statement; statement }
18
19 decision-making:
20 if (condition) statement [ else statement ]
21 switch (integer value) {
22 case integer: statement
23 ...
24 [ default: ] statement
25 }
26
27 loops: while (condition) statement
28 for (expression; condition; expression) statement
29 do limits statement
30 repeat statement [ until (condition) ]
31 break [n]
32 next [n]
33
34 and some syntactic sugar to make programs easier to read and write:
35
36 free form input:
37 multiple statements/line; automatic continuation
38
39 comments:
40 # this is a comment
41
42 translation of relationals:
43 >, >=, etc., become .GT., .GE., etc.
44
45 return (expression)
46 returns expression to caller from function
47
48 define:
49 define name replacement
50
51 include:
52 include filename
53
54 The option -h causes quoted strings to be turned into 27H constructs.
55 -C copies comments to the output, and attempts to format it neatly.
56 Normally, continuation lines are marked with a & in column 1; the
57 option -6x makes the continuation character x and places it in column
58 6.
59
60 Ratfor is best used with f77(1).
61
63 f77(1)
64 B. W. Kernighan and P. J. Plauger, Software Tools, Addison-Wesley,
65 1976.
66
67
68
69 RATFOR(1)