User Guide
Arrays and Strings
40
Axcess Programming Language
String Keywords
String keywords that you can use in the Axcess program are described below:
Array Keywords (Cont.)
MID_STRING Returns the specified number of characters starting at a specified location in
the source string. The length value of the array must be greater than 0; the
returned value is an array.
Syntax:
result = MID_STRING (string array, starting position,
number of characters)
REMOVE_STRING Finds and removes a specified sequence of characters in a specified string
array. All characters up to and including the sequence are removed. The
remaining characters in the string array move up to fill in the space. If the string
is not found, a null string is returned. The returned value is an array.
Syntax:
result = REMOVE_STRING (string array, sequence of
characters, starting position of search)
For example:
Y = 'ABCDEF'
X = REMOVE_STRING (Y,'CD',1)
(* X is 'ABCD' *)
(* Y is 'EF' *)
RIGHT_STRING Returns a specified number of characters from a specified string array, starting
at the end. The length value of the array must be greater than Ø; the returned
value is an array.
Syntax:
result = RIGHT_STRING (string array, number of
characters)
SET_LENGTH_STRING Sets the length value of an array to a specified value. The length value of an
array is used by several of the Axcess string operation keywords.
Syntax:
SET_LENGTH_STRING (string array, number)
String Keywords
REDIRECT_STRING Tells the Central Controller to pass all strings from device 1 to device 2, and all
strings from device 2 to device 1. This is called a redirection, and you can
assign up to eight of them at one time.
Syntax:
REDIRECT_STRING (entry number 1-8, device 1, device 2)
The entry number references a particular redirection. To cancel a redirection,
use the corresponding entry number and place zeros in the device number
locations in the parameters. Redirections are lost if the system power is turned
off.
SEND_COMMAND Sends device-specific commands to an Axcess device.
Syntax:
SEND_COMMAND card's device name, 'card command'
SEND_STRING Sends a string to a specific Axcess device. In some cases, a sequence of
strings can be interpreted as a command by the device.
Syntax:
SEND_STRING device, 'string'