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 #154 background imageLoading...
Page #154 background image
Reserved Identifiers
138
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
LEFT_STRING This function returns the specified number of characters from the beginning of
a string.
CHAR[ ] LEFT_STRING (CHAR STRING[ ], LONG Count)
WIDECHAR[ ] LEFT_STRING (WIDECHAR STRING[ ], LONG Count)
Parameters:
• STRING: The string from which to extract the characters.
• Count: The number of character to copy from the beginning of the string.
The result is a string containing a copy of the first Count characters from
STRING.
STRING = 'ABCDEFG'Substr = LEFT_STRING(STRING, 3)
// Substr = 'ABC'
LENGTH_ARRAY This function returns the effective length of a dimension of an array - implicitly
through array initialization or array manipulation operations (+ and -) or explic-
itly through a call to the function SET_LENGTH_ARRAY.
LONG LENGTH_ARRAY (<type> Array[ ])
Parameters:
• <type>: May be any intrinsic or user-defined data type
• Array: An array of any type.
The result is the effective (or working) length of the array.
INTEGER Len
INTEGER Array1[ ] = {3, 4, 5, 6, 7}
INTEGER Array2[ ] = {1, 2}
INTEGER My3DArray[5][3][4] =
{
{
{1,2,3,4},
{5,6,7,8},
{9,10,11}
}
{
{13,14}
}
}
Len = LENGTH_ARRAY(Array1) // Len = 5
Len = LENGTH_ARRAY(Array2) // Len = 2
Len = LENGTH_ARRAY(My3Darray)
(* Len = 2, the number of tables *)
Len = LENGTH_ARRAY(My3Darray[2])
(* Len = 1, the number of rows in table 2 *)
Len = LENGTH_ARRAY(My3Darray[1][3])
(* Len = 3, the number of columns in table 1, row 3 *)
See SET_LENGTH_ARRAY, on page 150, for more information.

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