Next: , Previous: , Up: The Rules File: Where the Magic Happens   [Contents]


2.3.7 The Mechanics of Evaluation: Snapshots vs. Live Streams

Understanding how STARTER "thinks" when it encounters an expression is the difference between a static setup and a truly fluid system. Let’s break down a simple logic gate:

time:second == 0;

To evaluate this, the system doesn’t just look at a stored number; it polls the value of time:second at the exact millisecond the calculation is triggered. If it catches the clock at the top of the minute, the result is TRUE. Otherwise, it’s FALSE.

But here’s where it gets interesting: Variables.

VAR second;
second = time:second;

If you’re coming from traditional programming, you might expect second to hold a static "snapshot" of the time when that line was executed. In STARTER, it doesn’t. By default, a variable acts as a Live Reference. Using second or time:second in your rules is functionally the same—it’s a dynamic link that updates in real-time as the clock ticks.