eqivalent for 'eq'

Started by HPW, April 15, 2005, 03:30:06 AM

Previous topic - Next topic

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.



(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}
Hans-Peter

Lutz

#1
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=Differences_to_Other_LISPs">http://newlisp.org/index.cgi?page=Diffe ... ther_LISPs">http://newlisp.org/index.cgi?page=Differences_to_Other_LISPs the points (8) and (10)



Lutz

HPW

#2
Oops, it happens from times to times that I think in alisp instead of newLISP! ;-)
Hans-Peter