Long_While; Lower_String; Lshift; Master_Sn - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Reserved Identifiers
Keywords & Run-Time Library Functions (Cont.)

LONG_WHILE

LOWER_STRING

LSHIFT

MASTER_SN

MASTER_SLOT

MAX_VALUE

MAX_LENGTH_ARRAY

140
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.
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)
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
This keyword contains the serial number of the master processor.
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".
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)
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 = MAX_LENGTH_ARRAY(NumArray)
Len = MAX_LENGTH_ARRAY(NumArray[1])
Len = MAX_LENGTH_ARRAY(NumArray[1][1])
NetLinx Programming Language Reference Guide
// VarMax = 200
// Len = 10
// Len = 5
// Len = 3
// Len = 4

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents