Iif(Condition: Variant;
TruePart: Variant;
FalsePart: Variant): Variant;
Iif(Condition: object;
TruePart: object;
FalsePart: object;
Context: Prognoz.Platform.Interop.Fore.ForeRuntimeContext): object;
Condition. Condition to be calculated.
TruePart. It is returned if the Condition value is True.
FalsePart. It is returned if the Condition value is False.
Context. Context. The parameter is used only in Fore.NET.
The Iif method provides conditional execution of operators.
The Iif method is equivalent to the three-place operator ?:.
Difference of the Iif method from the three-place ? operator:
Iif(Condition, TruePart, FalsePart)
Iif calculates values of Condition, TruePart, FalsePart first, and then, depending on the result of Condition, returns the TruePart or FalsePart value.
Condition ? TruePart : FalsePart
Three-place operator ? it calculates the Condition value first and then, depending on the result, it calculates either TruePart, or FalsePart.
The method use is given in the example for IModelling.IsSeriesEmpty.
See also: