xpfIfThenElseIf
FUNCTION xpfIfThenElseIf (condition1 : LOGICAL; value1 : GENERIC; condition2 : LOGICAL; value2 : GENERIC; condition3 : LOGICAL; value3 : GENERIC; condition4 : LOGICAL; value4 : GENERIC; condition5 : LOGICAL; value5 : GENERIC; condition6 : LOGICAL; value6 : GENERIC; condition7 : LOGICAL; value7 : GENERIC; condition8 : LOGICAL; value8 : GENERIC; condition9 : LOGICAL; value9 : GENERIC; condition10 : LOGICAL;value10 : GENERIC) value : GENERIC;
Function to "emulate" an IF-THEN-ELSEIF statement. The function has variable number of arguments, i.e., it can be invoked with a minimum of 2 arguments and a maximum of 20 arguments and the number of arguments must be an even number.
This operation works as follows:
FOR each given condition argument DO IF (condition = TRUE) THEN RETURN(related value argument); END_IF; END_FOR; RETURN(?);
Â
Â
Arguments
1 | Type | Name | Comment |
2 | LOGICAL | condition1 - condition10 | A logical value. When the logical value has the value TRUE the related "value" argument will be returned from the xpfIfThenElseIf() operation |
3 | GENERIC | value1 - value10 | Any legal value that will be returned from the xpfIfThenElseIf() operation when the related "condition" argument has the value TRUE. |
Return Value
Â
Type | Name | Comment |
GENERIC | value | The function returns one of the "value" arguments or INDETERMINATE (?). Exception handling should be used to handle error conditions in the actual xpfIfThenElseIf() operation. |
Options
Â
Example
<Missing Example>
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â