This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Multiple conditions in an if statement?

3 posts · 3778 views

How would one put multiple conditions in an if statement?

in C/C++ you would use && or &

if (x & y & z)
{blah}

how would you do this in lisp?

Re: Multiple conditions in an if statement?

Use the AND macro. This is fairly trivial question, perhaps reading a book like Practical Common Lisp would be faster than waiting for an answer on a forum (relevant chapter).

Re: Multiple conditions in an if statement?

Ok, thanks for your VERY quick reply, much appreciated, i tried doing a bit of research but i couldn't find anything on it :\