maybe I am getting it. can I say that the (t nil) or saying (t 0) controls the value of what cond returns?
I am not a real programmer, I know I am in the deep end of the pool here. normally, I do not consider what a return value is, I concern myself with calculations and with setq to save all the results I need. I am thinking my code could be cleaned up by actually using the return value in a case like this.
waste not - want not. OK, my comfort level rises. I had
(if (setq found (ssget "_f" f '((0 . "LINE,LWPOLYLINE") (8 . "iwall,xwall"))))
(foreach b (setq adj_sp (entget (ssname found 0)))
(if (= (car b) 10)
(setq m (append m (list (cdr b))))
)
)
(exit)
)
passing the results of ssget through setq for the conditional of my if.
yes, I think this is a great use for cond. my bug was when f, the points list I pass to ssget "_f", had a zero length. my first conditional in the cond will test for that length being zero, and only if it is has a positive length will the program ever see the ssget. I remove the if, make it a conditional, and the exit also becomes redundant.
thanks.
many thanks.