BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / ratfor.0
RATFOR(1) UNIX Programmer's Manual RATFOR(1)
N\bNA\bAM\bME\bE
ratfor - rational Fortran dialect
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
r\bra\bat\btf\bfo\bor\br [ option ... ] [ filename ... ]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bR_\ba_\bt_\bf_\bo_\br converts a rational dialect of Fortran into ordinary
irrational Fortran. _\bR_\ba_\bt_\bf_\bo_\br provides control flow constructs
essentially identical to those in C:
statement grouping:
{ statement; statement; statement }
decision-making:
if (condition) statement [ else statement ]
switch (integer value) {
case integer: statement
...
[ default: ] statement
}
loops:
while (condition) statement
for (expression; condition; expression) statement
do limits statement
repeat statement [ until (condition) ]
break
next
and some syntactic sugar to make programs easier to read and write:
free form input:
multiple statements/line; automatic continuation
comments:
# this is a comment
translation of relationals:
>, >=, etc., become .GT., .GE., etc.
return (expression)
returns expression to caller from function
define:
define name replacement
include:
include filename
_\bR_\ba_\bt_\bf_\bo_\br is best used with _\bf_\b7_\b7(1).
Printed 7/9/88 April 29, 1985 1
RATFOR(1) UNIX Programmer's Manual RATFOR(1)
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
f77(1)
B. W. Kernighan and P. J. Plauger, _\bS_\bo_\bf_\bt_\bw_\ba_\br_\be _\bT_\bo_\bo_\bl_\bs, Addison-
Wesley, 1976.
Printed 7/9/88 April 29, 1985 2