Program flow
Choose
Function | Parameters | Return value |
---|---|---|
Choose |
double index, params object[] choice |
object |
Returns an element of the choice
array with the index specified in the index
parameter. The first array element has 1 index.
Example:
Choose(2, "one", "two", "three") = "two"
IIf
Function | Parameters | Return value |
---|---|---|
IIf |
bool expression, object truePart, object falsePart |
object |
Returns the truePart
value, if the expression
is true
. Otherwise, returns the falsePart
value.
Example:
IIf(2 > 5, "true", "false") = "false"
Switch
Function | Parameters | Return value |
---|---|---|
Switch |
params object[] expressions |
object |
The parameter expressions
consists of pairs in the form "condition-value". It returns the first value for which the condition is true
.
Example:
// returns one of the following values - "а greater than 0",
// "а less than 0", "а equals to 0", depending on "a" value
Switch(
a > 0, "а greater than 0",
a < 0, "а less than 0",
a == 0, "а equals to 0")
IsNull
Function | Parameters | Return value |
---|---|---|
IsNull |
string name |
bool |
The parameter name
can represent the name of a database column, a parameter, or a total, and must be enclosed in double quotes.
If the value of the object specified by the parameter name
is null
, the method returns true
; otherwise, it returns false
.
Example:
IsNull("Parameter")