Retrieves the value of the specified item within an array. The returned value is the value of the array.
Category: | Array |
Returned data type: | Integer |
// Declare the string array "string_list" and Integer "i" string array string_list integer i // Set the dimension of string_list array to 5 and initialize the counter (i) to 1 string_list.dim(5) i=1 // Set and print each entry in the array, incrementing the counter by 1 while(i<=5) begin string_list.set(i,"Hello") print(string_list.get(i)) i=i+1 end
string array string_list integer i // set the dimension string_list.dim(5) i=1 // set and print each entry in the array while(i<=5) begin string_list.set(i,"Hello") print(string_list.get(i)) i=i+1 end // resize the array to 10 string_list.dim(10) while(i<=10) begin string_list.set(i,"Goodbye") print(string_list.get(i)) i=i+1 end