Operators & Syntax
Arithmetic, comparison, and grouping operators.
The formula engine supports standard mathematical operators for arithmetic, comparison, and logical operations.
Arithmetic Operators
+ Addition 5 + 3 = 8 - Subtraction 5 - 3 = 2 * Multiplication 5 * 3 = 15 / Division 15 / 3 = 5 ^ Power 2 ^ 3 = 8 % Modulo 7 % 3 = 1 () Grouping (2 + 3) * 4 = 20
Comparison Operators
Comparison operators return 1 (true) or 0 (false). Use them inside if() for conditional logic.
== Equal $width == 1000 != Not equal $type != "steel" > Greater than $height > 2000 < Less than $width < 500 >= Greater or equal $count >= 1 <= Less or equal $gap <= 50
Operator Precedence
- 1. Parentheses () — highest priority
- 2. Power ^ — right-to-left
- 3. Multiplication *, Division /, Modulo %
- 4. Addition +, Subtraction -
- 5. Comparison ==, !=, >, <, >=, <=
Variables
Reference parameters and calculations using the $ prefix. Variables can contain letters (including Cyrillic), digits, and underscores.
$width → parameter value $c1 → calculation result $цена_за_метр → Cyrillic variable name
Formula fields now highlight functions, variables, numbers, strings, and local syntax problems inline. When the issue is obvious and safe to fix, use the quick fix shown under the field.
Division by zero will produce an error. Use a conditional to guard against it: If($divisor != 0; $value / $divisor; 0).