add .Vx so tmac.andoc will call tmac.mdoc-old
[unix-history] / usr / src / old / ratfor / ratfor.1
CommitLineData
dd9e2e8d
CL
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.
c74f2173 4.\"
d0719240 5.\" @(#)ratfor.1 6.5 (Berkeley) %G%
b5dc1377 6.\"
ee9b0a0a
CL
7.Vx
8.Vx
b5dc1377
CL
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
c74f2173 21converts a rational dialect of Fortran into ordinary irrational Fortran.
b5dc1377 22.Nm Ratfor
c74f2173 23provides control flow constructs essentially identical to those in C:
b5dc1377
CL
24.Tw Fl
25.Tp statement grouping:
c74f2173 26{ statement; statement; statement }
b5dc1377
CL
27.Tp decision-making:
28.Ds I
29if (condition) statement { else statement }
c74f2173 30switch (integer value) {
b5dc1377
CL
31\tcase integer: statement
32\t...
33\t[default]: statement
c74f2173 34}
b5dc1377
CL
35.De
36.Tp loops:
37.Ds L
c74f2173
KM
38while (condition) statement
39for (expression; condition; expression) statement
40do limits statement
b5dc1377 41repeat statement [until (condition)]
c74f2173
KM
42break
43next
b5dc1377
CL
44.De
45.Tp
46.Pp
c74f2173 47and some syntactic sugar to make programs easier to read and write:
b5dc1377
CL
48.Tw Fl
49.Tp free form input:
c74f2173 50multiple statements/line; automatic continuation
b5dc1377 51.Tp comments:
c74f2173 52# this is a comment
b5dc1377 53.Tp translation of relationals:
c74f2173 54>, >=, etc., become .GT., .GE., etc.
b5dc1377 55.Tp return (expression)
c74f2173 56returns expression to caller from function
b5dc1377 57.Tp define:
c74f2173 58define name replacement
b5dc1377 59.Tp include:
c74f2173 60include filename
b5dc1377
CL
61.Tp
62.Pp
63.Nm Ratfor
c74f2173 64is best used with
b5dc1377
CL
65.Xr f77 1 .
66.Sh SEE ALSO
67.Xr f77 1
c74f2173
KM
68.br
69B. W. Kernighan and P. J. Plauger,
b5dc1377
CL
70.Em Software Tools ,
71Addison-Wesley,
721976.
73.Sh HISTORY
74.Nm Ratfor
75appeared in Version 7 AT&T UNIX.