Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

f77(1)

ratfor(1)

NAME

ratfor − rational Fortran dialect

SYNOPSIS

ratfor [options] [file ...]

DESCRIPTION

ratfor converts a rational dialect of Fortran into ordinary irrational Fortran.  ratfor 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:
...

}

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 per line and automatic continuation of lines

comments:
# this is a comment. 

compiler directives:
directives beginning with a dollar sign ($) in column one are passed through to the compiler unchanged. 

translation of relationals:
>, >=, etc., become .GT., .GE., etc. 

return expression to caller from function:
return (expression)

define:
define name replacement

include:
include file

Options

The following options are supported:

-h Cause quoted strings to be turned into Hollerith constructs as, for example, 6Hstring. 

-C Copy comments to the output and format them neatly. 

-6c Normally, continuation lines are marked with an & in column 1.  The -6c option defines c as the continuation character and places it in column 6. 

ratfor is best used with f77 (see f77(1)). Options can be passed to ratfor from f77 by using the f77 -Wr command-line option. 

SEE ALSO

f77(1). 

B. W. Kernighan and P. J. Plauger, Software Tools, Addison-Wesley, 1976. 

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026