Node:Atoms,
Next:Variables,
Previous:Floats,
Up:Terms
Atoms
Constants also include atoms such as
a void = := 'Algol-68' []
Atoms are definite elementary objects, and correspond to proper nouns
in natural language. For reference purposes, here is a list of the
possible forms which an atom may take:
- Any sequence of alphanumeric characters (including _), starting
with a lower case letter.
- Any sequence from the following set of characters:
+-*/\^<>=~:.?@#$&
This set can in fact be larger; see Token String for a precise
definition.
- Any sequence of characters delimited by single quotes. Unless character
escapes have been switched off, backslashes in the sequence denote
escape sequences (see Escape Sequences), and if the single quote
character is included in the sequence it must be escaped, e.g.
'can\'t'
.
- Any of: ! ; [] {}
Note that the bracket pairs are special: [] and {} are
atoms but [, ], {, and } are not. However,
when they are used as functors (see below) the form {X}
is allowed as an alternative to {}(X)
. The form
[X]
is the normal notation for lists, as an alternative to
.(X,[])
.