Conditionally evaluates expressions
Supported Platforms: Windows and Mac OS
(if testexpr thenexpr [elseexpr])
Type: Integer, Real, String, List, T, ads_name, or nil
Expression to be tested.
Type: Integer, Real, String, List, T, ads_name, or nil
Expression evaluated if testexpr is not nil.
Type: Integer, Real, String, List, T, ads_name, or nil
Expression evaluated if testexpr is nil.
Type: Integer, Real, String, List, T, ads_name, or nil
The if function returns the value of the selected expression. If elseexpr is missing and testexpr is nil, then it returns nil.
(if (= 1 3) "YES!!" "no.") "no." (if (= 2 (+ 1 1)) "YES!!") "YES!!" (if (= 2 (+ 3 4)) "YES!!") nil