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
Содержание 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...