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