RES stropping (The GNU Algol 68 Compiler)

#### 5.4.2 RES stropping ¶

The early installations where Algol 68 ran not only featured a very restricted character set, but also suffered from limited storage and complex to use and time consuming input methods such as card punchers and readers. It was important for the representation of programs to be as compact as possible.

It is likely that is what motivated the introduction of the RES stropping regime. As its name implies, it removes the need of stropping many bold words by introducing reserved words.

A reserved word is one of the bold words specified in the section 9.4.1 of the Report as a representation of some symbol. Examples are at, begin, if, int and real.

RES stropping encodes bold words and tags like POINT stropping, but if a bold word is a reserved word then it can then be written without a preceding point, achieving this way a more compact, and easier to read, representation for programs.

Introducing reserved words has the obvious disadvantage that some tags cannot be written the obvious way due to the possibility of conflicts. For example, to represent a tag `if` it is not possible to just write `IF`, because it conflicts with a reserved word, but this can be overcome easily (if not elegantly) by writing `IF_` instead.

Below is the `recsel output records` procedure again, this time encoded in RES stropping.

    PROC RECSEL OUTPUT RECORDS = VOID:
    BEGIN BITS FLAGS
             := (INCLUDE DESCRIPTORS | REC F DESCRIPTOR | REC F NONE);
          .RECRSET RES = REC DB QUERY (DB, RECUTL TYPE,
                                       RECUTL QUICK, FLAGS);
          .RECWRITER WRITER := REC WRITER FILE NEW (STDOUT);

          SKIP COMMENTS OF WRITER := TRUE;
          IF RECUTL PRINT SEXPS
          THEN MODE .OF WRITER := REC WRITER SEXP FI;
          REC WRITE (WRITER, RES)
    END

Note how user-defined mode an operator indications still require explicit stropping.