Page 1 of 1

eqivalent for 'eq'

Posted: Fri Apr 15, 2005 10:30 am
by HPW
Is there a eqivalent for a alisp command 'eq' in newLISP?

(eq expr1 expr2)

eq gives true when both expr are connected to the same object.

Code: Select all

(setq f1 '(a b c))
(setq f2 '(a b c))
(setq f3 f2)

(eq f1 f3) => nil  {not the sane lists}
(eq f3 f2) => true {the same lists}

Posted: Fri Apr 15, 2005 1:40 pm
by Lutz
Everything is referenced only once in newLISP, so there is no need for several operators testing on equality. Read here: http://newlisp.org/index.cgi?page=Diffe ... ther_LISPs the points (8) and (10)

Lutz

Posted: Fri Apr 15, 2005 1:44 pm
by HPW
Oops, it happens from times to times that I think in alisp instead of newLISP! ;-)