Previous: , Up: Ratfor   [Contents][Index]


9.3 Caveats about RATFOR

The version of RATFOR built into FWEB differs slightly from its UNIX counterpart:

  1. Numeric statement labels must be followed by a colon; they should be first on their line. (Use symbolic statement labels instead; see the discussion of ‘#:0’ in Tokens.)
  2. The quoting convention for characters and strings follows that of C: Single-quote single characters, double-quote strings.
  3. In a switch, cases fall through to the next case unless terminated by break (just as in C).
  4. The do statement must be terminated by a semicolon if followed by a simple statement. (It’s unnecessary if followed by a left brace that begins a compound statement.)
  5. Use && and || for the logical AND and OR.
  6. Do not use an end statement at the very end of a RATFOR program unit; it is added automatically by FWEB when the closing brace is sensed.