Previous: Commands, Up: Ratfor


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.