Formula Node Syntax
- Updated2025-08-15
- 5 minute(s) read
The Formula Node syntax is similar to the syntax used in text-based programming languages. Remember to end assignments with a semicolon (;) as in C. Use scope rules to declare variables in Formula Nodes. Also, keep in mind the allowed functions and the allowed operators and their precedence in the Formula Node.
The Formula Node syntax is summarized below using Backus-Naur Form (BNF notation). The summary includes non-terminal symbols: compound-statement, identifier, conditional-expression, number, array-size, floating-point-type, integer-type, left-hand-side, assignment-operator, and function. Symbols in red bold monospace are terminal symbols given exactly as they should be reproduced. The symbol # denotes any number of the term following it.












The following table provides the Formula Node syntax for control, conditional, iterative, and switch statements.
| Statement Type | Construct | Grammar | Description/Example |
|---|---|---|---|
| Control Statement | Break Statement |
![]() |
Use the break keyword to exit the nearest Do, For, or While Loop or switch statement in the Formula Node. |
| Continue Statement |
![]() |
Use the continue keyword to transfer control to the next iteration of the nearest Do, For, or While Loop in the Formula Node. | |
| Conditional Statement |
![]() |
if (y==x && a[2][3]<a[0][1]) {
int32 temp;
temp = a[2][3];
a[2][3] = y;
y=temp;
}
else
x=y;
|
|
| If Statement |
![]() |
||
| If-Else Statement |
![]() |
||
| Iterative Statement |
![]() |
||
| Do Loops |
![]() |
do {
int32 temp;
temp = --a[2]+y;
y=y-1;
}
while (y!=x && a[2]>=a[0]);
|
|
| For Loops |
![]() |
for (y=5; y<x; y*=2) {
int32 temp;
temp = --a[2]+y;
x-=temp;
}
|
|
| While Loops |
![]() |
while (y!=x && a[2]>=a[0]) {
int32 temp;
temp = --a[2]+y;
y=y-1;
}
|
|
| Switch Statement |
![]() |
switch(month){
case 2: days = evenyear? 29: 28; break;
case 4:case 6:case9: days = 30; break;
default: days = 31; break;
}
|
|
| Case Statement List |
![]() |
||
| Case Statement |
![]() |



































