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


2.3.1 Identifiers: The Power of Abstraction

In the code above, we see terms like beep:status, time:hour, and time:minute. In STARTER language, these are Identifiers.

Remember our mantra: generalize. Let’s break down what these identifiers represent in this specific context:

beep:status

This is an Output provided by the ST:Beep service. When set to TRUE, it triggers your computer to beep twice per second; when FALSE, it stays silent.

time:hour
time:minute

These are Inputs exposed by the ST:Time service. This service tracks the current system time and broadcasts it as three distinct inputs: hours, minutes, and seconds.

By writing those two rules, you’ve told the system: "At 7:00 AM, start beeping. For the rest of the time, stay quiet".