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