Programming Language for Old Timers

by David A. Moon
February 2006 .. September 2008

Comments and criticisms to dave underscore moon atsign alum dot mit dot edu.

Previous page   Table of Contents   Next page


The following sections explain the standard syntactic forms that could be considered to be statements. There is actually no distinction between a statement and an expression in PLOT; we just call an expression a statement if it tends to be used for effect or an expression if it tends to be used for value.

All of these statements are defined within the language by using macros. Their syntax is described here by showing the pattern portion of the macro definition, but the expansion portion is omitted.

Many statements use the syntactic type body. This is a sequence of expressions; they are executed in the order written and the last expression produces the value(s). However, if the keyword result: appears, the expression following it is the one that produces the value(s). These values are saved until the expressions after the result expression have been evaluated. The syntactic type body also allows a cleanup: keyword, explained below.

The syntactic type block is identical to body except it encloses the expressions in a block and it allows an exit: keyword, explained below.

Previous page   Table of Contents   Next page