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 #156 background imageLoading...
Page #156 background image
Reserved Identifiers
140
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
LONG_WHILE This keyword is the same as a WHILE statement except that input messages
are retrieved after each pass to allow the LONG_WHILE statements to process
the input.
LONG_WHILE (<conditional expression>){(* conditional
statements *)}
See the Language Elements section on page 31 for more on programming
loop constructs.
LOWER_STRING This function changes all alphabetic characters in the specified string to lower
case.
CHAR[ ] LOWER_STRING (CHAR STRING[ ])
WIDECHAR[ ] LOWER_STRING (WIDECHAR STRING[ ])
Parameters:
• STRING: The character string to convert to lower case.
The result is the converted character string.
LCString = LOWER_STRING(STRING)
LSHIFT This keyword causes the bits in the associated integer field to be shifted left.
This has the effect of multiplying by 2n, where n is the number of bit positions
to shift. The symbol << is equivalent to LSHIFT. For example:
INT2 = INT1 LSHIFT 2
is equivalent to:
INT2 = INT1 << 2
Both statements shift INT1 left two positions. Either statement could be
replaced with the following:
INT2 = INT1 * 4
MASTER_SN This keyword contains the serial number of the master processor.
MASTER_SLOT This keyword represents the slot number the master card is plugged into. "0" is
the primary master; "1" is the secondary master. This keyword is primarily
associated with Axcess systems. NetLinx systems have only one master, so
MASTER_SLOT in NetLinx is always "0".
MAX_VALUE Provides the value of the highest of two variables. It will take any intrinsic vari-
able type and return the same type of the highest variable.
MaxVal MAX_VALUE (Var1,Var2)
DEFINE_VARIABLE
SLONG Var1, Var2, VarMax
DEFINE_START
Var1 = 100
Var2 = 200
DEFINE_PROGRAM
VarMax = MAX_VALUE (Var1,Var2) // VarMax = 200
MAX_LENGTH_ARRAY This function returns the maximum length of a dimension of an array.
LONG MAX_LENGTH_ARRAY (<type> Array[ ])
Parameters:
• <type>: May be any intrinsic or user-defined data type.
• Array: An array of any type.
Result:
The length of the specified dimension of Array.
FLOAT FPArray[10]
LONG NumArray[5][3][4]
Len = MAX_LENGTH_ARRAY(FPArray) // Len = 10
Len = MAX_LENGTH_ARRAY(NumArray) // Len = 5
Len = MAX_LENGTH_ARRAY(NumArray[1]) // Len = 3
Len = MAX_LENGTH_ARRAY(NumArray[1][1]) // Len = 4

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