Menu

Variables

Create customized values with variables.

Variables are objects that hold mutable values.

Use cases:

  • Reserved keys to be used in rules.
  • Static values for improved readability.

Syntax

Help
variables:
  string:
    value: value
  ...
Key Required Type Default Description
value No - Null The initial value of the variable.

Examples

We have created two variables to be used later in rules.

Their initial values will be calculated with the statement. In this case it will resolve to 0.

variables:
  price:
    value: 0
  count:
    value: 0

We have created three math symbols as variables.

variables:
  PI:
    value: 3.141592653
  E:
    value: 2.718281828
  OMEGA:
    value: 0.567143290
Menu