then: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 22: Line 22:
First or second element of array is executed depending on result of [[if]] condition.
First or second element of array is executed depending on result of [[if]] condition.


Result of the expression executed is returned as a result (result may be [[Nothing]]).
Result of the expression executed is returned as a result (result may be nothing).





Revision as of 01:05, 17 April 2006

back to COMREF

if then else


Operand types:

if: If Type

else: Array

Type of returned value:

Anything

Compatibility:

Added in version 1.85

Description:

First or second element of array is executed depending on result of if condition.

Result of the expression executed is returned as a result (result may be nothing).


Example:

if (a>b) then {c=1} else {c=2}; if (a>b) then [{c=1},{c=2}]