Array procedures operate on a given array. Unlike functions, they do not return a value. Rather, they modify the actual array which is supplied to the procedure.
Sorts the elements of the array. The array's element type must have a defined sort order.
| Arguments |
|
| Result | The array with the elements sorted in ascending order. If the array contains null elements, an error will be thrown. |
myArray as Int [] = [7, 3, 5, 2] sort myArray display myArray
Clears all the elements of the array.
| Arguments |
|
| Result | The array with no elements. |
myArray as Int [] = [7, 3, 5, 2] clear myArray
Inserts an element in the specified position.
| Arguments |
|
| Result | The array with no elements. |
myArray as Int[] = [2, 7, 3, 4]
insert myArray
using int = 1,
value = 9
display myArray