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.

eval

eval

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

SYNTAX

(eval <expression> )
        <expression>    -       An arbitrary expression

DESCRIPTION

EVAL evaluates the <expression> and returns the resulting value.

EXAMPLES

(eval '(+ 2 2))                         ; returns 4
(eval (cons '+ '(2 2 2)))               ; returns 6
(eval (list '+ '2 '3 ))                 ; returns 5
(setq a 10)                             ; set up A with value 10        
(setq b 220)                            ; set up B with value 220
(eval (list '+ a b ))                   ; returns 230 because
                                        ;  (list '+ a b) => '(+ 10 220)
(eval (list '+ 'a b))                   ; returns 230 because
                                        ;  (list '+ 'a b) => '(+ A 220)
                                        ;  and A has the value 10


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