Nyquist / XLISP 2.0  - 
Contents |
Tutorials |
Examples |
Reference
eql
  | Type: | - | predicate function (subr) | 
  | Source: | - | xllist.c, xlsubr.c | 
Syntax
- (eql expr1 expr2)
- expr1 - the first expression to compare
 expr2 - the second expression to compare
 returns -  T  if the expressions have the
same symbolic or numerical value, NIL otherwise
 
Description
Two expressions are 'eql':
- If the expressions are eq. 
- If two numbers of the same type
are  = . 
- If two characters
are char=. 
In all other cases 'eql' returns NIL.
Note that arrays, lists, and strings are only 'eql' if they
are eq.
Examples
(eql 'a 'a)          => T
(eql 1 1)            => T
(eql 1 1.0)          => NIL
(eql 1.0 1.0)        => T
(eql "a" "a")        => NIL
(eql '(a b) '(a b))  => NIL
(eql 'a 34)          => 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 different (A B)
(eql a b)            => T
(eql a c)            => NIL
See also eq, equal,
cl:equalp.
  Back to Top
Nyquist / XLISP 2.0  - 
Contents |
Tutorials |
Examples |
Reference