Reserved Identifiers
Keywords & Run-Time Library Functions (Cont.)
MOD (%)
MODULE_NAME
NOT (!)
NON_VOLATILE
OFF
OFFLINE
ON
ONERROR
ONLINE
OR (||)
PAUSE_ALL_WAIT
PAUSE_WAIT
142
This keyword is used to generate the remainder of a division function.
Note: You cannot take the mod of an integer without first loading the value into
a variable. For example:
VRAM_LSB = ((2 % 16)+$30)
However,
ID = 2
OTHER = 16
VRAM_LSB = ((ID % OTHER) + $30)
This keyword introduces the definition of a module. It must appear on the first
line of the module implementation file.
MODULE_NAME = '<module name>' (<parameter list>)
See DEFINE_MODULE, on page 142, for more information.
This keyword is used to negate a given expression.
IF (NOT (X > 10))
{
// statements to execute if X <= 10
}
A variable declared with the NON_VOLATILE keyword is stored in non-volatile
memory. It retains its value in the event of a system power-down, but is reset to
zero if the program is reloaded. Unless specified otherwise, all variables are
stored in non-volatile memory.
This keyword is used to turn a channel or variable off. If used with a variable,
OFF sets it to zero.
OFF[DEVICE,CHANNEL]
OFF[(DEVCHAN[ ])]
OFF[Variable]
This keyword defines a section in a DATA event handler for processing
OFFLINE notifications. This is one of the important aspects of the
DATA_EVENT that is triggered when the master recognizes that a device has
been dropped off the bus.
This keyword is used to turn a channel or variable on. If used with a variable,
ON sets it to 1.
ON[DEVICE,CHANNEL]
ON[(DEVCHAN[ ])]
ON[Variable]
This keyword defines a section in a DATA event handler for processing
ONERROR notifications. Any error triggers an ONERROR event.
This keyword defines a section in a DATA event handler for processing ONLINE
notifications. This is one aspect of DATA_EVENT that is triggered when the
master recognizes that a device has been added to the bus. In NetLinx, every
device triggers an ONLINE event when the master is reset. This ensures that
the device is initialized on startup and that the device is initialized any time the
device comes online.
This keyword evaluates two conditions. If one or both conditions are true, the
entire expression evaluates to true.
This keyword suspends all WAITs currently in effect.
This keyword suspends the specified (named) WAIT until a RESTART_WAIT,
RESTART_ALL_WAIT, CANCEL_WAIT, or CANCEL_ALL_WAIT command is
issued.
PAUSE_WAIT '<wait name>'
NetLinx Programming Language Reference Guide
(* does not work *)
(* works *)