home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / FORTRAN / RATFOR.ZIP / RATFOR.DOC < prev    next >
Encoding:
Text File  |  1987-01-16  |  2.1 KB  |  58 lines

  1.     RATFOR is a preprocessor for FORTRAN source programs
  2. which facilitates control constructs and text insertions.
  3. With a few exceptions, acceptable FORTRAN syntax is passed
  4. through, so that all the capabilities of FORTRAN are retained,
  5. although syntax must be changed in certain cases.
  6.     RATFOR.COM is distributed by the CP/M Users' Group(V. 24).
  7. RATFOR.FOR is marketed for various systems by Addison-Wesley,
  8. who publish the book "Software Tools" by Kernighan and Plauger
  9. in which it is described.
  10.     RATFOR source code is free form, with statements
  11. separated by [CR] or ;  There is no statement continuation
  12. mark; if [CR] occurs where a statement cannot end syntactically
  13. continuation is assumed.  Blanks are significant and must not
  14. appear within names or key words.  Comments begin with # and
  15. end with [CR].  Statements may be grouped into blocks begin-
  16. ning with { and ending with }.  Other symbols such as $( $) may
  17. be used depending on the system employed.  Blocks are treated
  18. as one statement in control constructions.
  19.     The 3-way arithmetic IF is not permitted.  Statement
  20. labels must be less than 23000 since RATFOR will generate
  21. additional labels beginning at 23001.
  22.     The following operators are synonymous:
  23.     <    .LT.
  24.     <=    .LE.
  25.     ==    .EQ.
  26.     >=    .GE.
  27.     !=    ^=    .NE.
  28.     !    ^    .NOT.
  29.     &    .AND.
  30.     |    .OR.
  31.  
  32.     The logical IF may be extended by an ELSE, and nesting
  33. is permitted.  RATFOR iteration constructs are:
  34.     
  35. WHILE(condition)statement
  36.     
  37. REPEATstatement[UNTIL(condition)]
  38.     
  39. DO limits;statement (same as FORTRAN, label optional)
  40. FOR(initialize;condition;reinitialize)statement
  41. is equivalent to
  42. {initialize;WHILE(condition){statement;reinitialize}}
  43.  
  44. BREAK passes control to the instruction following the current
  45. loop.
  46.  
  47. NEXT skips the remainder of the "statement" block (but executes
  48. the "reinitialize").
  49.  
  50.     The text insertion instructions are:
  51.  
  52. define(name,text) causes all occurences of "name" to be
  53. replaced by text.  define must be lower case; otherwise upper or
  54.  lower case is generally accepted.
  55.  
  56.  
  57.  
  58. INCLUDE filename inserts the named file.
  59.