0 Members and 1 Guest are viewing this topic.
(setq var1 nil var2 0)(< var1 var2)
(setq l1 '(1 2) l2 '(1 2))(eq l1 l2) ==> nil(= l1 l2) ==> nil(equal l1 l2) ==> T
e1<Entity name: 7ef03798>e2<Entity name: 7ef03798>(eq e1 e2) ==> T(= e1 e2) ==> nil(equal e1 e2) ==> T
Had a bug in one of my programs (introduced by a quick edit I had done this morning). Fortunately I found it and fixed it quick but in some circumstances it could be a bugger to trace the following (seemingly) illogical behavior.<clears throat> ahem (symbolically):...
(cond ((and var1 var2) (< var1 var2)) )
(< -1e+99 var1 var2)(< nil var1 var2)
huh? That could be a real pain to find.Code: [Select](cond ((and var1 var2) (< var1 var2)) )I mean, Ive never really thought to run a conditional for every equality test.
On eq vs equal, generally speaking I use eq when comparing numbers or strings, otherwise equal.
(equal l1 l2) ==> T
Lee,Code: [Select](equal l1 l2) ==> TQuote(equal l1 l2) ==> TWith this font it looked like eleven & twelve.
[]http://www.karolinagames.com/horatio/images/90d31b379587cb1bf205881c9a1209ee.jpg[/img]
anyone else confused about the two sets of sunglasses?