$Select()

Examples of $SELECT()

The $SELECT function returns a value associated with the first true truth-valued expression in a list of paired expression arguments.

The format for the $SELECT function is:

    $S[ELECT](tvexpr:expr[,...])
    

$SELECT() is one of a limited set of functions that permit an indefinite number of arguments. $SELECT() provides a means of selecting from a list of alternatives.

Generally, the last $SELECT() argument has numeric literal one (1) for a truth-value to prevent run-time errors, and to provide a "default" value.