xref: /csrg-svn/old/ratfor/ratfor.1 (revision 47335)
144281Scael.\" Copyright (c) 1990 Regents of the University of California.
244281Scael.\" All rights reserved.  The Berkeley software License Agreement
344281Scael.\" specifies the terms and conditions for redistribution.
419454Smckusick.\"
5*47335Scael.\"     @(#)ratfor.1	6.5 (Berkeley) 03/14/91
643083Scael.\"
7*47335Scael.Vx
8*47335Scael.Vx
943083Scael.Dd
1043083Scael.Dt RATFOR 1
1143083Scael.Os ATT 7th
1243083Scael.Sh NAME
1343083Scael.Nm ratfor
1443083Scael.Nd rational Fortran dialect
1543083Scael.Sh SYNOPSIS
1643083Scael.Nm ratfor
1743083Scael.Op Ar option ...
1843083Scael.Op Ar filename ...
1943083Scael.Sh DESCRIPTION
2043083Scael.Nm Ratfor
2119454Smckusickconverts a rational dialect of Fortran into ordinary irrational Fortran.
2243083Scael.Nm Ratfor
2319454Smckusickprovides control flow constructs essentially identical to those in C:
2443083Scael.Tw Fl
2543083Scael.Tp statement grouping:
2619454Smckusick{ statement; statement; statement }
2743083Scael.Tp decision-making:
2843083Scael.Ds I
2943083Scaelif (condition) statement { else statement }
3019454Smckusickswitch (integer value) {
3143083Scael\tcase integer:	statement
3243083Scael\t...
3343083Scael\t[default]: statement
3419454Smckusick}
3543083Scael.De
3643083Scael.Tp loops:
3743083Scael.Ds L
3819454Smckusickwhile (condition) statement
3919454Smckusickfor (expression; condition; expression) statement
4019454Smckusickdo limits statement
4143083Scaelrepeat statement [until (condition)]
4219454Smckusickbreak
4319454Smckusicknext
4443083Scael.De
4543083Scael.Tp
4643083Scael.Pp
4719454Smckusickand some syntactic sugar to make programs easier to read and write:
4843083Scael.Tw Fl
4943083Scael.Tp free form input:
5019454Smckusickmultiple statements/line; automatic continuation
5143083Scael.Tp comments:
5219454Smckusick# this is a comment
5343083Scael.Tp translation of relationals:
5419454Smckusick>, >=, etc., become .GT., .GE., etc.
5543083Scael.Tp return (expression)
5619454Smckusickreturns expression to caller from function
5743083Scael.Tp define:
5819454Smckusickdefine name replacement
5943083Scael.Tp include:
6019454Smckusickinclude filename
6143083Scael.Tp
6243083Scael.Pp
6343083Scael.Nm Ratfor
6419454Smckusickis best used with
6543083Scael.Xr f77  1  .
6643083Scael.Sh SEE ALSO
6743083Scael.Xr f77 1
6819454Smckusick.br
6919454SmckusickB. W. Kernighan and P. J. Plauger,
7043083Scael.Em Software Tools ,
7143083ScaelAddison-Wesley,
7243083Scael1976.
7343083Scael.Sh HISTORY
7443083Scael.Nm Ratfor
7543083Scaelappeared in Version 7 AT&T UNIX.
76