$GETARRAY (get value of array data)
$GETARRAY acquires information of a specified array number from information stored in an array.
Syntax
return-value=$GETARRAY(array-name,array-number)
Values
-
return-value
Specifies the name of the variable into which the acquired information is set.
-
array-name
Specifies the variable name of the array from which to read information.
-
array-number
Specifies the array number of the array element from which information is to be read, either as a constant or a variable. A constant must be enclosed in single quotation marks (''). Specified values can range from 1 to 2,147,483,647.
If no array element of the specified array number exists, a 0-byte character string is returned.
Status
The following table lists and describes the possible statuses:
Status |
Description |
---|---|
NORMAL |
Normal end |
NODATA |
No information exists for the specified array number. |
ERROR |
— |
Script execution interrupted |
An invalid argument was specified, or an error other than the above occurred. |
Example
See the example for $SETARRAY (set value to array).