IF

**Syntax:** **IF( X, T, F)**

*X* = a numeric value

*T* = a value

*F* = a value

**IF** returns the value of *T* if *X* evaluates to non-zero, or
*F* if *X* evaluates to zero. This function is included only
for compatibility with other spreadsheets. In SpreadScript, **IF**
is identical to *X*?*T*:*F*, which is more efficient to
evaluate.

**Examples:**

**IF**(A1, 7, 9) = 7, where A1 = 1

**IF**(B17==0, 0, ``non-zero'') = ``non-zero'', where B17 = 1

**Excel function:** IF

Grey Trout Software

02 March 2003