Language Elements
35
NetLinx Programming Language Reference Guide
MEDIUM_WHILE (<conditional expression>)
{
(* conditional statements *)
}
LONG_WHILE statements
A
LONG_WHILE
differs from a
WHILE
statement in the way input change notifications are processed
during the programming loop. The system checks the input queue for a change notification message
before execution of each loop, beginning with the second loop. The message is retrieved if one exists.
This message must be processed before another one is retrieved, either at the start of the next loop or the
beginning of the next mainline iteration. Otherwise, the message is lost. For example:
LONG_WHILE (<conditional expression>)
{
(* conditional statements *)
}
DEFINE_EVENT
events are still processed even if mainline is in a
LONG_WHILE
.
FOR loop structure
The
FOR
loop structure allows you to define initialization statements; statements to execute after each
pass through the loop and a condition to test after each pass. If the condition evaluates to true, another
pass is made. Otherwise, the loop is terminated. The syntax of the
FOR
loop is as follows:
FOR (<INITIAL>; <condition>; <after pass>)
{
(* loop statements *)
}
Parameters:
LONG_WHILE
should not be used in Events. It may cause unexpected results.
<INITIAL>
One or more statements that are executed one time before any
FOR
loop state-
ments are executed. Each statement must be separated with a comma; this is
typically a
FOR
loop index initialization statement.
<condition>
A condition whose value is computed before each pass. If the condition evalu-
ates to TRUE, the
FOR
loop statements are executed. If the condition evaluates
to FALSE, the loop is terminated.
<after pass>
One or more statements that are executed after each pass through the state-
ments. Each statement must be separated with a comma. This is typically a
statement that increments the
FOR
loop index.
Содержание NETLINX PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...