MTS 8: LISP and SLIP in MTS
Page Revised February 1979 June 1976
For example, when the atomic string "BOOK" first appears in the
input stream, an atomic structure with the PNAME "BOOK" is
automatically created. Any future references to the atom BOOK
reference the same structure. The system OBJECT LIST maintains
pointers to all atomic structures, and each atomic string which
appears in the input stream is checked against this list.
Types of Atoms
There are two types of atoms in LISP: literal atoms and numeric
atoms. When an atom name appears in the input stream, the form of
the name and the current input number base determine the type of
the atom.
If the input number base is 10 (the default case), then FORTRAN-
type integers and single-precision floating-point numbers are
treated as decimal numbers and become numeric atoms. All other
character strings become literal atoms.
If the input number base is 16 (the user may change the number base
by calling the STATUS function), FORTRAN-type floating-point num-
bers are still treated as decimal numbers and become numeric atoms.
However, any character string beginning with a decimal digit (0-9)
and containing only hexadecimal digits (0-9, A-F) are treated as a
hexadecimal number and become a numeric atom with the value of that
hexadecimal number.
If the input number base is 0, then all character strings are
interpreted as literal atom names, and no numeric atoms are
created.
Unlike literal atoms, numeric atoms are not stored on the system
OBJECT LIST; instead, a new atom is created each time a number
appears in the input stream. Thus, two occurrences of the atomic
string "17" produce references to two distinct structures.
VALUE of an Atom
Atoms can have VALUEs, which may be any LISP structure. The VALUE
of a literal atom is undefined (set to the special system atom
*UNDEF*) until a value is given to it. All numeric atoms, by
convention, have themselves as their VALUEs. The VALUE of an atom
is the CAR of the atomic structure (see the discussion of CAR and
CDR below).
Property-Lists
Besides a VALUE, a literal atom can have any number of properties,
and each property has a property-value. For example, the atom BOOK
may have a property COLOR with property-value BLUE, and a property
PAGES with property-value 367. The name of a property is referred
to as the property indicator, or IND, and the property-value is
referred to as the PVAL.
10 LISP