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