Reserved Identifiers
139
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
LENGTH_STRING
This function returns the length of a
CHAR
or
WIDECHAR
string. This function is
retained for compatibility with previous versions of Axcess and provides the
same information as
LENGTH_ARRAY
.
LONG LENGTH_STRING (CHAR STRING[ ])
LONG LENGTH_STRING (WIDECHAR STRING[ ])
Parameters:
•
STRING
: The input character string.
The result is the length of
STRING
. The string length can be set implicitly
through a literal or variable string assignment or explicitly by calling
SET_LENGTH_STRING
. For example:
IF (LENGTH_STRING(STRING) > 0)
{
// process string
}
LENGTH_VARIABLE_TO_
STRING
(VARIABLE Encode)
This routine calculates how many bytes it takes to encode a variable.
LONG LENGTH_VARIABLE_TO_STRING (VARIABLE Encode)
Parameters:
•
Encode
: The variable (any type) to be encoded.
Result:
• >0: Number of bytes required to encode variable.
• 0: Encoded variable error, unrecognized type
LENGTH_VARIABLE_TO_
XML
CHAR LENGTH_VARIABLE_TO_XML(CONSTANT VARIANTARRAY A,
LONG B)
Where:
•
A
is the variable (any type) to be encoded.
•
B
is the encoding flag. These can be used together.
Value $01
is "Encode with Types". If the bit is set, types will be included for
every variable being encoded. The default is to not include types.
Value $10
is "Encoded CHAR arrays as using data list". See the
Binary array
encoding
section on pages 219.
Value $20
is "Array Encoding is Little-Ending".
The return is the length needed to encode the variable.
LEVEL_EVENT
This keyword defines a level event handler and can only be used in the
DEFINE_EVENT
section of the program. This type of handler is invoked when a
level change occurs on the specified device-channel. The level object is avail-
able to the level event handler as a local variable.
LEVEL_EVENT[DEVICE,LEVEL] or LEVEL_EVENT[([DEVLEV[ ])]
{
// level event handler
}
See the
Event Handlers
section on page 61 for more information.
LOCAL_VAR
This keyword specifies a variable that is static. To provide compatibility with the
Axcess language, local variables may be declared right before the opening
brace for
DEFINE_CALL
declarations only.
If neither the LOCAL_VAR nor the STACK_VAR keyword is specified,
STACK_VAR is assumed.
See the
Variables
section on page 11 for more information.
LONG
This keyword defines an intrinsic data type representing a 32-bit unsigned
value.
Содержание 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...