xref: /original-bsd/old/ratfor/ratfor.1 (revision c3e32dec)
1.\" Copyright (c) 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.proprietary.man%
5.\"
6.\"	@(#)ratfor.1	8.1 (Berkeley) 06/06/93
7.\"
8.Dd
9.Dt RATFOR 1
10.Os ATT 7th
11.Sh NAME
12.Nm ratfor
13.Nd rational Fortran dialect
14.Sh SYNOPSIS
15.Nm ratfor
16.Op Ar option ...
17.Op Ar filename ...
18.Sh DESCRIPTION
19.Nm Ratfor
20converts a rational dialect of Fortran into ordinary irrational Fortran.
21.Nm Ratfor
22provides control flow constructs essentially identical to those in C:
23.Bl -tag -width indent
24.It Statement grouping:
25{ statement; statement; statement }
26.It Decision-making:
27.Bd -unfilled -compact
28if (condition) statement { else statement }
29switch (integer value) {
30\tcase integer:	statement
31\t...
32\t[default]: statement
33}
34.Ed
35.It Loops:
36.Bd -unfilled -compact
37while (condition) statement
38for (expression; condition; expression) statement
39do limits statement
40repeat statement [until (condition)]
41break
42next
43.Ed
44.El
45.Pp
46And some syntactic sugar to make programs easier to read and write:
47.Bl -tag -width Fl
48.It Free form input:
49multiple statements/line; automatic continuation
50.It Comments:
51# this is a comment
52.It Translation of relationals:
53>, >=, etc., become .GT., .GE., etc.
54.It Return (expression)
55returns expression to caller from function
56.It Define:
57define name replacement
58.It Include:
59include filename
60.El
61.Pp
62.Nm Ratfor
63is best used with
64.Xr f77  1  .
65.Sh SEE ALSO
66.Xr f77 1
67.Rs
68.%A B. W. Kernighan
69.%A P. J. Plauger
70.%T "Software Tools"
71.%I Addison-Wesley
72.%D 1976
73.Re
74.Sh HISTORY
75.Nm Ratfor
76appeared in
77.At v6 .
78