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.

eq

eq

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

SYNTAX

(eq <expr1> <expr2> )
        <exprN>         -       an expression to compare

DESCRIPTION

The EQ predicate checks to see if <expr1> and <expr2> are identical. T is returned if they are exactly the same internal value, NIL is returned otherwise.

EXAMPLES

(eq 'a 'a)                              ; returns T
(eq 1 1)                                ; returns T
(eq 1 1.0)                              ; returns NIL
(eq 1.0 1.0)                            ; returns NIL
(eq "a" "a")                            ; returns NIL
(eq '(a b) '(a b))                      ; returns NIL
(eq 'a 34)                              ; returns NIL
(setq a '(a b))                         ; set value of A to (A B)
(setq b a)                              ; set B to point to A's value
(setq c '(a b))                         ; set value of C to dif. (A B)
(eq a b)                                ; returns T
(eq a c)                                ; returns NIL 


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