TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: HasanCAD on May 27, 2012, 08:30:44 AM
-
What is difference between ...
(and (setq p1 ... )
(setq p2 ... )
(setq p3 ... )
(setq p4 ... )
)
And
(and (setq p1 ...
p2 ...
p3 ...
p4 ... )
)
?
-
(and (setq p1 ... )
(setq p2 ... )
(setq p3 ... )
(setq p4 ... )
)
returns T if none of p1 p2 p3 p4 is nil and stops the evaluation when the first nil is reached.
(and (setq p1 ...
p2 ...
p3 ...
p4 ... )
)
returns T if p4 is not nil.
-
Also consider this:
In the event the first expression evaluates to nil the first code will terminate without evaluating the second expression, while the 2nd code will still continue even if the frist expression results to nil and it will generate an error.
HTH
-
I got it
gile Thanks
pBe Thanks