XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

:constituent


Type:   -   keyword
Source:   -   xlread.c

Syntax

 :constituent

Description

':constituent' is an entry that is used in the *readtable* 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.

See the :constituent keyword in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next