if expression function

Returns the value of the second or third argument depending on the truth of the first argument.

All Usage Examples

See also: ifs

Usage

if(expression, true_value, false_value)

Note

This is a function, which means all parameters to the function are evaluated. So something like if($F > 1, system('echo 1'), system('echo 2')) will result in both system calls being run regardless of the result of the expression.

Examples

if ($F<12, $F, 75)

When the current frame number ($F) is less than 12, returns the current frame number, otherwise returns 75.