Function if
if condition trueResult [falseResult]
Returns one of two possible values, depending on the boolean value
of the first argument.
- Parameters:
- condition -
A boolean value or a block whose execution results in a boolean value.
- trueResult -
An object of any type.
- falseResult -
An object of any type.
- Returns:
-
The evaluation of trueResult if condition
evaluates to true, othwerise the evaluation of falseResult
if it exists, or the null object if it is not specified.
-
The three argument version of the if function could be
defined in terms of the cond function like this:
define if ( aCondition truObj falseObj ) {
cond $aCondition $trueObj $falseObj
}
Report a bug or request new features
© 2002