SelectSwitch
The SelectSwitch function iterates through the set of predicates and values in the order in which these are specified in its arguments list. It will return the value associated with the first predicate that specifies a non-zero integer value. If no asserting predicate can be found, the function will return the value of default_value.
Syntax
SelectSwitch(predicate_0, value_0, …predicate_i, value_i, default_value)
Remarks
The following code:
SelectSwitch(temp < 60, $"brrrr",
temp < 65, $"comfortable",
$"head for the hills")
is the equivalent of the following nested IIF statements:
IIF(temp < 60,
$"brrrr",
IIF(temp < 65,
$"comfortable",
$"head for the hills"))