cond

(cond (test1 [action1 ...]) ... )

The cond function is the primary conditional function.

The function evaluates the first item in each given list until one of these items returns a value other than nil. It then evaluates each of the following items in this list. The function returns the value of the last expression in the sub-list.

Example

(cond

   ((< x 0) (princ "X is less than 0"))

   ((= x 0) (princ "X is equal 0"))

   (T (princ "X is greater than 0"))

)