Synopsis Include the results of an interactive session of the Rascal interpreter.
<screen OptErrors>
Description The commands in the RascalCode are executed and they are show together with the response of the Rascal system.

The following is supported:
  • Lines that start with // are formatted as ordinary text. This makes it possible to write a story with interspersed Rascal code.
  • Comments in the code of the form /*Number*/ are replaced by numbered markers such as that can be used in the text to refer back to the code.

    If any error messages are generated or exceptions are raised, they will be logged as warnings. The precise set of words that triggers a warning is:
  • Exception, exception
  • Error, error
  • cancelled.
  • Timeout, timeout.
If the OptErrors is non-empty, it is assumed that the error is expected and it will not be logged.
Examples The text:
1 + 2;

will be shown as:
rascal>1 + 2;
int: 3
  • All code in a concept is actually executed before it is included in an HTML file.
  • In the warnings, an overview is maintained of code fragments that produce unexpected errors.
  • <screen> and </screen> should start at the begin of a line.
  • The RascalCode in a screen is executed in a fresh Rascal Interpreter. Hence no state can be carried over between screens.
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit