Arithmetic
The grammar supports arithmetic and mathematical operations:
1
20 - 18
2
AS professional experience
Copied!
Of course, variables or attributes from the schema can also be used within an arithmetic operation.
Let's look at the following scheme and two predefined variables:
YAML
JSON
1
age : 0
Copied!
1
{
2
age : 0
3
}
Copied!
1
18
2
AS career start
3
4
age - career start
5
AS professional experience
Copied!
Arithmetic expressions can be arbitrarily complex using parentheses:
1
(20 - 18) * 12
2
AS professional experience in months
Copied!
Arithmetic expressions can also be used directly within a rule:
1
the professional experience from age - 18 years MUST NOT be LESS than 10
Copied!

Reference

Currently the following mathematical operations are supported:
Operator
Name
Discription
+
Addition
simple addition
-
Subtraction
simple subtraction
*
Multiplication
simple multiplication
/
Division
simple division
MOD
Modulo
remaining
more will be added soon...
Copy link
Contents
Reference