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
32 next
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 Ratfor is best used with f77(1).
55
57 f77(1)
58 B. W. Kernighan and P. J. Plauger, Software Tools, Addison-Wesley,
59 1976.
60
61
62
637th Edition April 29, 1985 RATFOR(1)