Arrays - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Language Elements
In the example above, if
will evaluate to "
assume a value of up to 65,535, rather than the limit of 255 imposed by the standard character string.
A
string may be assigned or compared to a wide character string. For example:
CHAR
WChar = 'FFWD'
- or -
IF (WChar = 'REV')
{
}
Each 8-bit character in the
operation is performed.

Arrays

In the Axcess language, arrays can be declared with 8-bit (string) or 16-bit (integer) fields.
Name[20]
INTEGER Number[10]
The NetLinx language allows arrays of any data type supported by the language, as well as, arrays of
user-defined structures and classes. If an initialization statement is included in the variable declaration,
the array dimension is not required. If the array dimension is omitted, both the maximum and effective
length is set to the length needed to hold the data contained in the initialization string.
CHAR
WIDECHAR
INTEGER
SINTEGER
LONG
SLONG
FLOAT
DOUBLE
String expressions are not allowed for initialization statements.
The initialization statement for a single dimension character string is enclosed in single quotes; data for
other types is enclosed in braces. In the case of a multidimensional character string, the strings in the
initialization statement are separated by commas and enclosed in braces. In order to populate the array,
for example:
52
is 2 and
STOP
2, 500, 79, 70, 70, 1000
(* statements *)
string is converted to 16-bit before the assignment or comparison
CHAR
The syntax for an 8-bit (string) field is:
// 8-bit character array
The syntax for a 16-bit (integer) field is:
// 16-bit integer array
STRING[ ] = 'character string'
WideString[ ] = 'wide character string'
IntegerNum[ ] = {1, 2, 3, 4, 5}
SINTEGERNum[ ] = {-1, 5, -6}
LONGNum[ ] = {$EFFF, 0, 89000}
LONGNum[ ] = {-99000, 50, 100, 100000}
FloatingNum[ ] = {1.0, 20000.0, 17.5, 80.0}
DoubleNum[ ] = {1.0e28, 5.12e-6, 128000.0}
is a wide character whose value is 1000, the string expression
X
" and
is 6. Each array element can now
StrLen
NetLinx Programming Language Reference Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents