Commit | Line | Data |
---|---|---|
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 | 21 | converts a rational dialect of Fortran into ordinary irrational Fortran. |
b5dc1377 | 22 | .Nm Ratfor |
c74f2173 | 23 | provides 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 | |
29 | if (condition) statement { else statement } | |
c74f2173 | 30 | switch (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 |
38 | while (condition) statement |
39 | for (expression; condition; expression) statement | |
40 | do limits statement | |
b5dc1377 | 41 | repeat statement [until (condition)] |
c74f2173 KM |
42 | break |
43 | next | |
b5dc1377 CL |
44 | .De |
45 | .Tp | |
46 | .Pp | |
c74f2173 | 47 | and some syntactic sugar to make programs easier to read and write: |
b5dc1377 CL |
48 | .Tw Fl |
49 | .Tp free form input: | |
c74f2173 | 50 | multiple 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 | 56 | returns expression to caller from function |
b5dc1377 | 57 | .Tp define: |
c74f2173 | 58 | define name replacement |
b5dc1377 | 59 | .Tp include: |
c74f2173 | 60 | include filename |
b5dc1377 CL |
61 | .Tp |
62 | .Pp | |
63 | .Nm Ratfor | |
c74f2173 | 64 | is best used with |
b5dc1377 CL |
65 | .Xr f77 1 . |
66 | .Sh SEE ALSO | |
67 | .Xr f77 1 | |
c74f2173 KM |
68 | .br |
69 | B. W. Kernighan and P. J. Plauger, | |
b5dc1377 CL |
70 | .Em Software Tools , |
71 | Addison-Wesley, | |
72 | 1976. | |
73 | .Sh HISTORY | |
74 | .Nm Ratfor | |
75 | appeared in Version 7 AT&T UNIX. |