EasyManuals Logo

AMX NETLINX PROGRAMMING LANGUAGE User Manual

AMX NETLINX PROGRAMMING LANGUAGE
246 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #34 background imageLoading...
Page #34 background image
NetLinx Programming Overview
18
NetLinx Programming Language Reference Guide
 Only the statements associated with the first case that matches the value of the expression are
executed. Multiple
CASE statements can be stacked within the SWITCH...CASE statement. If
the value matches one of the
CASE statements, the statements associated with the stack will be
executed.
 If no CASE matches the SWITCH expression, then the statements under the default case (if
available) are executed. The default statement must be the last case within the
SWITCH...CASE, otherwise the remaining case statements will not execute.
 All cases must be unique.
 Braces should be used to bracket the statements in a case. They are required only if variables
are declared within the case.
 The BREAK statement applies to the SWITCH and takes execution to the end of the SWITCH.
Unlike C and C++, cases do not fall through to the next case if a break is not used. Because of
this,
BREAK statements are not required between cases.
The following is the structure for the
SWITCH...CASE statement:
SWITCH (<expression>)
{
CASE <numeric constant or string literal>:
{
(* statements for CASE 1 *)
}
CASE <numeric constant or string literal>:
{
(* statements for CASE 2 *)
}
CASE <numeric constant or string literal>:
{
(* statements for CASE n; there can be as many cases as necessary *)
}
DEFAULT <numeric constant or string literal>:
{
(* statements for DEFAULT case *)
}
}
FOR loops
FOR loops are an alternative to traditional loops. Functionally they do the same thing, but FOR loops are
more readable.
FOR loops, like WHILE loops, do not process input changes from the message buffer. The
structure for a
FOR loop is shown below:
FOR (<INITIAL>;<condition>;<after pass>)
{
(* loop statements *)
}

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the AMX NETLINX PROGRAMMING LANGUAGE and is the answer not in the manual?

AMX NETLINX PROGRAMMING LANGUAGE Specifications

General IconGeneral
BrandAMX
ModelNETLINX PROGRAMMING LANGUAGE
CategorySoftware
LanguageEnglish

Related product manuals