Expressions in RCML can consist of numeric constants, variables and returned function results that can be used as operands of the mathematical and logical operations as part of the expression. Operations, in turn, may be unary or binary. Priority of operations in expressions is given in parentheses, just as it is in mathematics. The result of the expression can be assigned to a variable or transferred as a parameter to a function. It is possible for those function parameters that work with these data types. Using special variables to communicate with a robot in the context of expressions is prohibited at the level of syntax rules.

Example expressions:

a = 1 + 1;
a – 5;
c = a * b;
d = sum(a, с) * 10 * (a / c);
e = -d + 15;
f = d >= 10;
!f;

2.10.1 Mathematical Operations

The following binary mathematical operations are available in RCML:

  • «+» - addition operator;
  • «-» - subtraction operator;
  • «*» - multiplication operator;
  •  «/» - simple division operator;
  •  «%» - taking remainder of division operator.

And one unary operation:

  • «-» - sign change.

2.10.2 Logical Operations

The following binary operations from logical operations are available in RCML:

  • «==» - checking equality;
  • «!=» - checking inequality;
  • «>=» - checking greater than or equal to;
  • «<=» - checking less than or equal to;
  • «>» - checking greater than;
  • «<» - checking less than;
  • «&&» - conjunction, AND operation;
  • «||» - disjunction, OR operation.

And one unary operation:

  • «!» - logical negation.