[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

A.7 Mechanics

CSPMscripts are expressible using the 7-bit ASCII character set (which forms part of all the ISO 8859-x character sets). While this can make the representation of some operators ugly, it makes it possible to handle the scripts using many existing tools including editors, email systems and web-browsers.

Comments can be embedded within the script using either end-of-line comments preceded by `--'or by block comments enclosed inside ‘{-’ and ‘-}’. The latter nest, so they can be safely used to comment out sections of a script. However, there is the potential for confusion with sets with a leading unary minus. It is therefore suggested that block comments be used in the following way, where the start and end marks are on a line by themselves:

 
{-
  This comment requires more than a single line of text,
  so is better suited to being a block comment, rather than
  several single line comments using `--'.
-}

Block comments are handled more efficiently by the lexer than repeated end-of-line comments.

Wherever possible, scripts should be designed to stand alone without the need for accompanying files. If it is necessary to exploit an existing library of definitions, the include directive performs a simple textual inclusion of another script file. The directive must start at the beginning of a line and takes a filename enclosed in double quotes. Block comments may not straddle file boundaries (comments cannot be opened in one file and closed in another).

There is no mechanism equivalent to the include path used by C compilers. Included files are searched for only in the current working directory, which (in the case of FDR) is the directory containing the script which was loaded into FDR.

Definitions within in a script are separated by newlines. Lines may be split before or after any binary token and before any unary token. (There are exceptions to this rule, but they do not occur in practice.)

The attribute, embed and module keywords are currently reserved for experimental language features.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Phil Armstrong on May 17, 2012 using texi2html 1.82.