Login | Sign Up

AutoLISP Function Detail
Name: if

(if test then [else])

Evaluates the test expression to see if it is True. If the test is found True then the THEN statement(s) are evaluated. If the test is found to be nil (or False) the ELSE statements are evaluated when supplied.

(if (= (+ 1 1) 2)
  (prompt "\nValue is 2")
  (prompt "\nValue was other than 2")