2.1 Primitive Data Types

Integers are also called ”fixed” numbers. The magnitude of an integer is unrestricted. Integers in the LISP input stream are recognized by the grammar:
<digit> ::= 0123456789

<unsigned-integer> ::= <digit><unsigned-integer><digit>

<integer> ::= <unsigned-integer>



- Any floating point number. The precision of floating point numbers is determined solely by the implementation. In BNF floating point numbers are recognized by the grammar:
<base> ::= <unsigned-integer>..<unsigned-integer>


<unsigned-floating> ::= <base>




<floating> ::= <unsigned-floating>


An identifier is a string of characters which may have the following items associated with it.

print name
The characters of the identifier.
An identifier may be tagged with a flag. Access is by the FLAG, REMFLAG, and FLAGP functions defined in section 3.4 on page 30.
An identifier may have an indicator-value pair associated with it. Access is by the PUT, GET, and REMPROP functions defined in section 3.4 on page 30.
An identifier may have a value associated with it. Access to values is by SET and SETQ defined in section 3.6 on page 35. The method by which the value is attached to the identifier is known as the binding type, being one of LOCAL, GLOBAL, or FLUID. Access to the binding type is by the GLOBAL, GLOBALP, FLUID, FLUIDP, and UNFLUID functions.

An identifier may have a function or macro associated with it. Access is by the PUTD, GETD, and REMD functions (see “Function Definition”, section 3.5, on page 32). An identifier may not have both a function and a value associated with it.

OBLIST entry
An identifier may be entered and removed from a structure called the OBLIST. Its presence on the OBLIST does not directly affect the other properties. Access to the OBLIST is by the INTERN, REMOB, and READ functions.

The maximum length of a Standard LISP identifier is 24 characters (excluding occurrences of the escape character !) but an implementation may allow more. Special characters (digits in the first position and punctuation) must be prefixed with an escape character, an ! in Standard LISP. In BNF identifiers are recognized by the grammar:

<special-character> ::= !<any-character>

<alphabetic> ::=



<lead-character> ::= <special-character><alphabetic>

<regular-character> ::= <lead-character><digit>

<last-part> ::= <regular-character>


<id> ::= <lead-character><lead-character><last-part>

Note: Using lower case letters in identifiers may cause portability problems. Lower case letters are automatically converted to upper case when the !*RAISE flag is T.

A set of characters enclosed in double quotes as in ”THIS IS A STRING”. A quote is included by doubling it as in ”HE SAID, ””LISP”””. The maximum size of strings is 80 characters but an implementation may allow more. Strings are not part of the OBLIST and are considered constants like numbers, vectors, and function-pointers.
A primitive structure which has a left and right part. A notation called dot-notation is used for dotted pairs and takes the form:
(<left-part> . <right-part>)

The <left-part> is known as the CAR portion and the <right-part> as the CDR portion. The left and right parts may be of any type. Spaces are used to resolve ambiguity with floating point numbers.

A primitive uniform structure in which an integer index is used to access random values in the structure. The individual elements of a vector may be of any type. Access to vectors is restricted to functions defined in “Vectors” section 3.9 on page 45. A notation for vectors, vector-notation, has the elements of a vector surrounded by square brackets1
<elements> ::= <any><any> <elements>

<vector> ::= [<elements>]

An implementation may have functions which deal with specific data types other than those listed. The use of these entities is to be avoided with the exception of a restricted use of the function-pointer, an access method to compiled EXPRs and FEXPRs. A particular function-pointer must remain valid throughout execution. Systems which change the location of a function must use either an indirect reference or change all occurrences of the associated value. There are two classes of use of function-pointers, those which are supported by Standard LISP but are not well defined, and those which are well defined.

Not well defined
Function pointers may be displayed by the print functions or expanded by EXPLODE. The value appears in the convention of the implementation site. The value is not defined in Standard LISP. Function pointers may be created by COMPRESS in the format used for printing but the value used is not defined in Standard LISP. Function pointers may be created by functions which deal with compiled function loading. Again, the values created are not well defined in Standard LISP.
Well defined
The function pointer associated with an EXPR or FEXPR may be retrieved by GETD and is valid as long as Standard LISP is in execution. Function pointers may be stored using PUTD, PUT, SETQ and the like or by being bound to variables. Function pointers may be checked for equivalence by EQ. The value may be checked for being a function pointer by the CODEP function.