Xbasic
reverseArray Function
Syntax
V reverseArray(A array)
Arguments
- array
The array to reverse.
Description
Reverses an array.
Examples
The example below reverses an array of numbers.
dim p[3] as n p[1] = 1 p[2] = 2 p[3] = 3 reverseArray(p) ?p.dump() = 3 2 1
The example below reverses an array of character strings.
dim p[2] as p p[1].name = "alpha" p[2].name = "beta" reverseArray(p) ?p.dump_properties("name") = "beta" "alpha"
See Also