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.

symbol-value

symbol-value

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

SYNTAX

(symbol-value <symbol> )
        <symbol>        -       an expression that evaluates to a symbol name 

DESCRIPTION

The SYMBOL-VALUE function takes the <symbol> expression and returns the current value of the <symbol>.

If the <symbol> had not existed, then it will be created and INTERNed into the system symbol table *OBARRAY* - but with it's value unbound and an empty property list. In this case of a previously non-existant <symbol>, since it has no bound value, the SYMBOL-VALUE will still report an error due to an unbound variable.

EXAMPLES

(setq myvar 55)                         ; set MYVAR to value 55
(symbol-value 'myvar)                   ; returns 55
                                        ;
(symbol-value 'floop)                   ; error: unbound variable 
                                        ;
(setq my-symbol 'a)                     ; set MY-SYMBOL to A
(setq a '(contents of symbol a))        ; set A to value -
                                        ;   (CONTENTS OF SYMBOL A)
(symbol-value my-symbol)                ; returns (CONTENTS OF SYMBOL A)


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