Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

:constituent

:constituent

type: keyword
location: built-in
source file: xlread.c
Common LISP compatible: no
supported on: all machines

SYNTAX

:constituent

DESCRIPTION

:CONSTITUENT is an entry that is used in the *READTABLE*. *READTABLE* is a system variable that contains XLISP's data structures relating to the processing of characters from the user (or files) and read-macro expansions. The existance of the :CONSTITUENT keyword means that the specified character is to be used, as is, with no further processing. The system defines that the following characters are :CONSTITUENT characters:

0123456789 !$%&*+-./ :<=>?@[]^_{}~ ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz

EXAMPLES

(defun look-at (table)                  ; define a function to 
 (dotimes (ch 127)                      ;   look in a table
  (prog ( (entry (aref table ch)) )     ;   and print out any     
    (case entry                         ;   entries with a function
      (:CONSTITUENT                     ;
          (princ (int-char ch)))        ;
      (T            NIL))))             ;
 (terpri))                              ;
(look-at *readtable*)                   ;  prints  !$%&*+-./0123456789
                                        ;          :<=>?@ABCDEFGHIJKLM
                                        ;          NOPQRSTUVWXYZ[]^_ab
                                        ;          cdefghijklmnopqrstu
                                        ;          vwxyz{}~

CAUTION: If you experiment with *READTABLE*, it is useful to save the old value in a variable, so that you can restore the system state.


Go to the first, previous, next, last section, table of contents.