newLISP Fan Club

Forum => Anything else we might add? => Topic started by: HPW on April 15, 2005, 03:30:06 AM

Title: eqivalent for 'eq'
Post by: HPW on April 15, 2005, 03:30:06 AM
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}
Title:
Post by: Lutz on April 15, 2005, 06:40:58 AM
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 the points (8) and (10)



Lutz
Title:
Post by: HPW on April 15, 2005, 06:44:48 AM
Oops, it happens from times to times that I think in alisp instead of newLISP! ;-)