A declarer is a source construct that specifies some particular
mode. The simplest form of a declarer is the name of a mode, which
can be one of the predefined primitive modes such as int
,
real
or compl
, or a mode
indication previously defined by the programmer, such as
tree_node
. Declarers can get arbitrarily complicated
depending the mode they specify. For example, the declarer
corresponding to a ref to a row of structs is
ref[]struct (int age, string name)
.
Declarers specify modes, but they are not the same than modes.
Different declarers can specify the same mode. This is the case for
example with union(int,real)
and
union(real,int)
, which specify the same united mode
(unions are commutative and associative in Algol 68). Also, declarers
can convey information that is not properly part of the mode it
specifies. An example is [10:20]int
, which denotes the
mode row of integers but that also specify bounds which are not part
of the mode. This is an example of actual declarer, that provides
bounds to be used by a sample generator.
There are three kind of declarers, depending on the context where they appear and whether they convey bounds information or not: formal declarers, actual declarers and virtual declarers.