xpfIfThenElseIfEx

FUNCTION xpfIfThenElseIfEx (condition1 , value1 : GENERIC; options1 : INTEGER;
                            condition2 , value2 : GENERIC; options2 : INTEGER;
                            condition3 , value3 : GENERIC; options3 : INTEGER; 
                            condition4 , value4 : GENERIC; options4 : INTEGER; 
                            condition5 , value5 : GENERIC; options5 : INTEGER; 
                            condition6 , value6 : GENERIC; options6 : INTEGER;
                            condition7 , value7 : GENERIC; options7 : INTEGER;
                            condition8 , value8 : GENERIC; options8 : INTEGER;
                            condition9 , value9 : GENERIC; options9 : INTEGER;
                            condition10, value10: GENERIC; options10: INTEGER;)
                            value                                   : GENERIC;
                

The function has variable number of arguments, i.e., it can be invoked with a minimum of 3 arguments and a maximum of 30 arguments and the number of arguments must be modulo 3.

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


1TypeNameComment
2GENERICcondition1 - condition10

A "condition" argument can be specified as one of the following: When the xpxCONITION_EXPRESSION is set in the related "option" argument:

  1. As an EDMexpressX expression (string) that will be decoded to an EDMruntimeExpression and evaluated in the actual xpfIfThenElseIfEx() operation. The actual EDMruntimeExpression must evaluate to a logical value.
  2. As an integer that identifies an existing EDMruntimeExpression. An EDMruntimeExpression is an expression that is defined and decoded (compiled) at run time of an EDMexpressX schema. This EDMruntimeExpression will be evaluated and the result must be a logical value.
     
    When the xpxCONITION_EXPRESSION is not set in the related "option" argument: The "condition" argument should be logical value.

 

3GENERICvalue1 - value10

A "value" argument can be specified as one of the following:

When the xpxVALUE_EXPRESSION is set in the related "option" argument:

  1. As an EDMexpressX expression (string) that will be decoded to an EDMruntimeExpression and evaluated in the actual xpfIfThenElseIfEx() operation. The resulting value will be returned from the xpfIfThenElseIfEx() operation when the related "condition" argument value is TRUE.
  2. As an integer that identifies an existing EDMruntimeExpression. An EDMruntimeExpression is an expression that is defined and decoded (compiled) at run time of an EDMexpressX schema.This EDMruntimeExpression will be evaluated in the actual xpfIfThenElseIfEx() operation.The resulting value will be returned from the xpfIfThenElseIfEx() operation when the related "condition" argument value is TRUE.

 When the xpxVALUE_EXPRESSION is not set in the related "option" argument:

         The "value" argument value will will be returned from the xpfIfThenElseIfEx() operation when the related "condition" argument value is TRUE

4INTEGERoptions1 - options10Optional argument. The default value is "xpxCONITION_EXPRESSION ~| xpxVALUE_EXPRESSION"

Return Value


 

TypeNameComment
GENERICvalueThe function returns one of the "value" arguments or INDETERMINATE (?). Exception handling should be used to handle error conditions in the actual xpfIfThenElseIf() operation.

Options


OptionComment

xpxCONDITION_EXPRESSION

The corresponding "condition" argument should be specified as an EDMruntimeExpression.
xpxCONDITION_ARGUMENT_VALUEThe corresponding "condition" argument should be logical value.
xpxVALUE_EXPRESSIONThe corresponding "value" argument should be specified as an EDMruntimeExpression.
xpxVALUE_ARGUMENT_VALUEThe corresponding "value" argument data value will be used as is. In this case any EDMexpressX data type is legal for the corresponding "value" argument.

 

Example


<Missing Example>

 

See also

Filter by label

There are no items with the selected labels at this time.

Â