@If
Syntax
@If(Condition1;TrueValue1;ElseValue);
@If(Condition1;TrueValue1[;Condition2;TrueValue2;...;Condition49;TrueValue49];ElseValue);
Description
Evaluates 1 to 49 conditions BOOL Condition1..49 and returns as the result the value from TrueValue1..49 that immediately follows the first matching condition Condition1..49 . If no condition Condition1..49 matches, the value ElseValue is returned.
NOTE:
Strings are allowed as conditions; they are TRUE if they contain at least one character; otherwise FALSE.
Example: @If(Condition1;TrueValue1;ElseValue)
Condition1:=1;
@If(Condition1;"True value";"False value"); returns "True value"
Condition1:=0;
@If(Condition1;"True value";"False value"); returns "False value"
Example: (Condition1;TrueValue1[;Condition2;TrueValue2;…;Condition49;TrueValue49];ElseValue);
Condition1:=0;
Condition2:="";
Condition3:="x";
Condition4:=1;
@If(Condition1;"One";Condition2;"Two";Condition3;"Three";Condition4;"Four";"Zero");
returns "Three"
Note : This text was machine-translated and may contain inaccuracies.
