$UPDARRAYBYKEY (update value of array with key)
$UPDARRAYBYKEY updates the value of an array element of an array variable. The array element is specified using a key and the array number in the key.
Syntax
$UPDARRAYBYKEY(array-name,key-value(,array-number-in-key),character-string)
Values
-
array-name
Specifies the name of the array in which a value is to be updated.
-
key-value
Specifies the key value of the array element to be updated, either as a constant or a variable. A constant must be enclosed in single quotation marks ('').
-
array-number-in-key
Specifies the array number in the key when there are multiple data values that correspond to the key to be updated, as a numeric character, 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.
You can omit this value. If it is omitted, the default is 1.
-
character-string
Specifies the value to be updated, either as a constant or a variable. A constant must be enclosed in single quotation marks ('').
Status
The following table lists and describes the possible statuses:
Status |
Description |
---|---|
NORMAL |
Normal end |
NODATA |
Indicates one of the following:
|
ERROR |
— |
Script execution interrupted |
An invalid argument was specified, or an error other than the above occurred. |
Example
See the example in $SETARRAYBYKEY (set value to array with key).