Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

af77(1)

efl(1)

f77(1)



  ratfor(1)                           CLIX                           ratfor(1)



  NAME

    ratfor - Runs a rational FORTRAN translator

  SYNOPSIS

    ratfor [-h] [-C] [-6x] [file ... ]

  FLAGS

    -h    Causes quoted strings to be turned into 27H constructs.

    -C    Copies comments to the output and attempts to format it neatly.

    -6x   Makes the continuation character x and places it in column 6.

  DESCRIPTION

    The ratfor command converts a rational dialect of FORTRAN into FORTRAN77.
    The ratfor command provides control flow constructs essentially identical
    to those in C:

    Statement Grouping

           ⊕  { statement; statement; statement }

    Decision-making

           ⊕  if (condition) statement [else statement]

           ⊕  switch (integer-expression) {
                   case integer-expression: statement
                   ...
                   [default:] statement
              }

    Loops

           ⊕  while (condition) statement

           ⊕  for (expression; condition; expression) statement

           ⊕  do limits statement

           ⊕  repeat statement [until (condition)]

           ⊕  break

           ⊕  next

    Some constructs make programs easier to read and write:



  2/94 - Intergraph Corporation                                              1






  ratfor(1)                           CLIX                           ratfor(1)



    Free Form Input

           ⊕  ; - multiple statements/line

           ⊕  automatic continuation

    Comments

           ⊕  # this is a comment.

    Translation of Relationals

           ⊕  >, >=, and so on, become .GT., .GE., and so on.

    Return Expression to Caller from Function

           ⊕  return (expression)

    Define

           ⊕  define name replacement

    Include

           ⊕  include file

    The ratfor command is best used with f77.

  EXAMPLES

    1.  This example causes the ratfor translator to translate the source
        statements in the file myfile.r into standard FORTRAN and display the
        resulting FORTRAN program to stdout.

        ratfor myfile.r


    2.  This example is the same as the one above, except that the FORTRAN
        program is placed in the file myfile.f.

        ratfor myfile.r > myfile.f


  EXIT VALUES

    The exit values are not valid.

  RELATED INFORMATION

    Commands: af77(1), efl(1), f77(1)




  2                                              Intergraph Corporation - 2/94




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