Standard modes

Many of the modes available in the standard prelude are built from the standard modes of the language which are all defined in the Revised Report.

VOID
This mode has one value: EMPTY. It is mainly used as the yield of routines and in unions.
BOOL
This mode has two values, namely TRUE and FALSE.
INT
This is the basic arithmetic mode. Various precisions are available:-
  1. LONG INT 64-bit integer
  2. INT 32-bit integer
  3. SHORT INT 16-bit integer
  4. SHORT SHORT INT 8-bit integer
REAL
This mode is used mainly for approximate calculations although exact values can be manipulated provided that the number of significant digits does not exceed the precision of the mantissa (see section 13.2.1). The following precisions are available:-
  1. REAL 64-bit real
  2. SHORT REAL 32-bit real
COMPL
Strictly speaking, this is not a fundamental mode because it is regarded as a structure with two fields:-
   MODE COMPL = STRUCT(REAL re,im)
However, the widening coercion will convert a REAL value into a COMPL value and COMPL values are not straightened (see section 13.7.6). Like REALs, the following precisions are available:-
  1. COMPL 128-bit
  2. SHORT COMPL 64-bit
CHAR
This mode is used for most character operations. See section 13.2.2 for further details.
BITS
This mode is equivalent to a computer word regarded as a group of bits (binary digits) numbered 1 to bits width (see section 13.2.1). Various precisions are available:-
  1. LONG BITS 64-bit
  2. BITS 32-bit
  3. SHORT BITS 16-bit
  4. SHORT SHORT BITS 8-bit
BYTES
The Revised Report describes the mode, but the a68toc compiler does not implement it.
STRING
This mode is defined as
   MODE STRING = FLEX[1:0]CHAR
and is provided with a shorthand construct for denotations of such values (see section 3.1).
Sian Mountbatten 2012-01-19