Command Reference : Function Reference : Function Reference: I
  
 
@iif
Recode values by condition (conditional value).
Syntax: @iif(s, x, y)
s: number
x: number or string
y: number or string
Return: number or string
Returns if is non-zero (true); otherwise returns .
Typically is specified using an expression with a boolean operator or function returning (0, 1) values (e.g., “z > 3” or “z > w”), but any argument providing (0, non-zero) values is sufficient.
Examples
= @iif(x<0,1,0)
returns 1 if x is negative, 0 otherwise.
Cross-references
See also @nan and @recode.