Expressions¶
Expressions can contain literal values, identifiers (constants, formulas,
local and global variables) and operators. Literals for Booleans, integers and
doubles are written in the standard way: true, false, 4, 3.14.
Operators¶
The following operators can be used in expressions, ordered by their precedence (most strongly binding operators first):
[...],.,(...)(array indexing, member access, function call)-(unary minus)*,/(multiplication, division)+,-(addition, subtraction)>,>=,<,<=(relational operators)=,!=(equality operators)!(unary negation)&(logical and)|(logical or)=>(implication)... ? ... : ...(ternary if-then-else)
Built-in functions¶
The following built-in functions are provided:
min(x, y, ...)andmax(x, y, ...)which select the minimum or maximum of two or more numbers, respectively.floor(x)andceil(x)which roundxup and down, respectively, to the nearest integer.pow(x, y)which computesxto the power ofy.mod(i, n)for integer modulo.log(x, b)which computes the logarithm ofxto baseb.active(f)returnstrueif the featurefis in the current feature combination.iactive(f)returns1if the featurefis in the current feature combination, and0otherwise.