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