Node:Atoms, Next:, 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:

  1. Any sequence of alphanumeric characters (including _), starting with a lower case letter.
  2. Any sequence from the following set of characters:
    +-*/\^<>=~:.?@#$&
    This set can in fact be larger; see Token String for a precise definition.
  3. 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'.
  4. 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,[]).