Sets values for items within an array. The returned value is the old value of the specified element in the array.
Category: | Array |
Returned data type: | Integer |
<array name>.SET(n,"string")
array name
is the name of the array that you declared earlier in the process
n
is the number of the dimension you are setting the value for; this can be specified as a numeric constant, field name, or expression
string
is the value that you want to place into the array element; this can be specified as a string constant, field name, or expression
The SET function sets the value of an entry in the array.
//Declare the string array "string_list"
// Set the dimension of string_list array to 5
string array string_list
string_list.dim(5)
// Set the first string element in the array to "Hello"
string_list.set(1,"Hello")
string array string_list
string_list.dim(5)
// sets the first string element in the array to hello
string_list.set(1,"hello")