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.

make-symbol

make-symbol

type: function (subr) 
location: built-in
source file: xlbfun.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

(make-symbol <symbol-str> )
        <symbol-str>    -       a string expression

DESCRIPTION

The MAKE-SYMBOL function takes a string name - <symbol-str> and creates a new symbol. This symbol is temporary and is not interned (placed) into the symbol hash table *OBARRAY*. If the symbol already exists, no error or action is taken and the old values and property lists remain intact. The MAKE-SYMBOL function returns the symbol as its result.

EXAMPLES

(defun lookin (sym)                     ; create a function to 
   (aref *obarray*                      ;   look inside *OBARRAY*
         (hash sym (length *obarray*))));   and look for a specific
                                        ;   symbol - returns a list
                                        ;
(lookin "FEE")                          ; returns (CHAR-INT NTH ++) 
                                        ;   FEE symbol doesn't exist
(MAKE-SYMBOL "FEE")                     ; returns FEE symbol
(lookin "FEE")                          ; returns (CHAR-INT NTH ++) 
                                        ;   FEE still doesn't exist
(intern "FEE")                          ; intern FEE symbol
(lookin "FEE")                          ; returns (FEE CHAR-INT NTH ++) 
                                        ;   FEE does now exist

NOTE: When you MAKE-SYMBOL a symbol like "fingers", this is a lower case symbol. Note that this is different from doing a MAKE-SYMBOL on "FINGERS". "fingers" and "FINGERS" are two different symbols. Remember also that normal symbols created by XLISP are upper case names.


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