Expression
From Bohemia Interactive Community
An expression is a piece of code that returns a value.
Contents |
[edit]
Types of Expressions
An expression can be:
[edit]
Variable
An expression can be a simple variable (identifier):
Examples:
_myVariable globalVariable
[edit]
Operation
An expression can be an operation including its operands.
Examples:
5 * 6 a % 2 b * c
[edit]
Scripting Command
An expression can be a scripting command returning a value including its arguments.
Examples:
count myArray position unit1
[edit]
Control Structure
An expression can be a control structure returning a value.
Examples:
if (myCondition) then {myValueA} else {myValueB}
=> returns myValueA or myValueB

