Program Flow

Program Flow

Name

Syntax

Description


Choose


choose(NUMBER, "argument_1", "argument_2", [...], "argument_n")

Selects and returns a value from a list of arguments.

Note that the first argument is addressed with the number "1", not with "0".


iif


iif(CONDITION, THEN-VALUE, ELSE-VALUE)

Returns one of two values, depending on the evaluation of the condition.

All arguments are evaluated prior to returning a value.


if


if(CONDITION, THEN-VALUE, ELSE-VALUE)


if(ARGUMENT_1, ARGUMENT_2)

Returns one of two values, depending on the evaluation of the condition.

Depending on the result of the condition, only the THEN-VALUE or only the ELSE-VALUE is evaluated.

Compared to the iif function, this evaluation is potentially faster. Also, it can be useful to avoid a Null Reference.

  • Called with three arguments:

    The first argument must return a Boolean value.

    If(myObject Is Nothing,"Doesn't Exist",myObject.SomeProperty())

  • Called with two arguments:

    The first argument must be a nullable type. It is returned if it exists. If the first argument evaluates to Nothing, the value of the second argument is returned.

    If(compound_name,"Compound name not defined")