
Reserved Identifiers
141
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
MAX_LENGTH_STRING
This function returns the dimensioned length of a
CHAR
or
WIDECHAR
string.
This function is retained for compatibility with previous versions of Axcess. It
provides the same information as
MAX_LENGTH_ARRAY
.
LONG MAX_LENGTH_STRING (CHAR STRING[ ])
LONG MAX_LENGTH_STRING (WIDECHAR STRING[ ])
Parameters:
•
STRING
: The input character string.
Result:
The dimensioned length of
STRING
.
MaxLen = MAX_LENGTH_STRING(STRING)
Len = LENGTH_STRING(STRING)
IF (MaxLen > Len)
{
// append character to STRING
}
MEDIUM_WHILE
This keyword is obsolete in the new NetLinx system. The compiler will treat it
as a
WHILE
keyword. See the
Language Elements
section on pages 31 for
information on programming loop constructs.
MID_STRING
This function returns the specified number of characters, starting at the speci-
fied location in the source string.
CHAR[ ] MID_STRING (CHAR STRING, LONG Start, LONG Count)
WIDECHAR[ ] MID_STRING (WIDECHAR STRING, LONG Start, LONG
Count)
Parameters:
•
STRING
: The input character string.
•
Start
: Starting location in the string.
•
Count
: Number of characters to extract.
The result is a character string containing the specified characters.
STRING = 'ABCDEFGHIJK'
Substr = MID_STRING(STRING, 5, 4)
(* Substr = 'EFGH' *)
MIN_VALUE
Provides the value of the lowest of two variables. It will take any intrinsic vari-
able type and return the same type of the lowest variable.
MinVal MIN_VALUE (Var1,Var2)
DEFINE_VARIABLE
SLONG Var1, Var2, VarMin
DEFINE_START
Var1 = 100
Var2 = 200
DEFINE_PROGRAM
VarMin = MIN_VALUE (Var1,Var2) // VarMin = 100
MIN_TO
This keyword operates just like the
TO
keyword, except that the specified chan-
nel or variable stays on for a minimum length of time, even if the corresponding
channel is released. The minimum length of time is set by
SET_PULSE_TIME
.
MIN_TO
follows the same conditions of operation as the
TO
keyword.
See
SET_PULSE_TIME
, on page 150, for more information.
Summary of Contents for NETLINX PROGRAMMING LANGUAGE
Page 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Page 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Page 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Page 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Page 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Page 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Page 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Page 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Page 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Page 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...