alijahed Posted May 19, 2010 Posted May 19, 2010 Hi All, how can I say this in autolisp: (if (= a b) then do these (xxx) (xx) (xxxx) ) I want to do several things after having a=b. I wrote: (if (= a b) ((xxx) (xx) (xxxx)) ) but for some reasons doesn't work! can you please help me with this? Cheers Ali Quote
fuccaro Posted May 19, 2010 Posted May 19, 2010 Progn is your new friend. The (if (A) (B) ©) means: if A is true then do B else do C. to do more "things" use the (progn...) command. (if (A) (progn B1 B2 B3) (progn C1 C2...)) This structure can be translated as: If A is true then do B1, after that do B2, B3; If A is not true then do C1, c2,... Quote
fuccaro Posted May 19, 2010 Posted May 19, 2010 You found it out by yourself. This knowledge is more valuable. Quote
alijahed Posted May 19, 2010 Author Posted May 19, 2010 You found it out by yourself. This knowledge is more valuable. Thanks mate, As always explained it very nice. Yes, I found it by searching the help. As I used to programming in Basic when I was at high-school I am familiar a little bit with programming so I was guessing something like that should be exist. autoLISP is fantastic!!! I am new and just started a week ago but found it incredible. Thanks All for your support Ali Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.