Operations

Operators


Adaptive expressions support the following operator types and expression syntax:

  • arithmetic
  • comparison
  • logical
  • other operators and expressions syntax

Arithmetic

OperatorFunctionalityPrebuilt Function Equivalent
-Addition. Example: A + Badd
-Subtraction. Example: A - Bsub
unary +Positive value. Example: +1, +AN/A
unary -Negative value. Example: -2, -BN/A
-Multiplication. Example: A * Bmul
/Division. Example: A / Bdiv
^Exponentiation. Example: A ^ Bexp
%Modulus. Example: A % Bmod

Comparison

OperatorFunctionalityPrebuilt Function Equivalent
==Equals. Example: A == Bequals
!=Not equals. Example: A != Bnot(equals())
>Greater than. Example: A > Bgreater
<Less than. Example: A < Bless
> =Greater than or equal. Example: A >= BgreaterOrEquals
<=Less than or equal. Example: A <= BlessOrEquals

Logical

OperatorFunctionalityPrebuilt Function Equivalent
&&And. Example: exp1 && exp2and
||Or. Example: exp1 || exp2or
!Not. Example: !exp1not

Other

OperatorFunctionalityPrebuilt Function Equivalent
& , +Concatenation operators. Operands will always be cast to string. Examples: A & B, 'foo' + ' bar''foo bar', 'foo' + 3'foo3', 'foo' + (3 + 3)'foo6'N/A
'Used to wrap a string literal. Example: 'myValue'N/A
"Used to wrap a string literal. Example: "myValue"N/A
[]Used to refer to an item in a list by its index. Example: A[0]N/A
${}Used to denote an expression. Example: ${A == B}N/A
${}Used to denote a variable in template expansion. Example: ${myVariable}N/A
()Enforces precedence order and groups sub-expressions into larger expressions. Example: (A+B)*CN/A
.Property selector. Example: myObject.Property1N/A
\Escape character for templates, expressions.N/A