Reverse method: Array class

Syntax

Reverse()

Description

The Reverse method reverses the order of the elements in the array.

If the array is composed of subarrays, the Reverse method reverses only the elements in the super-array, it doesn’t reverse all the elements in the subarrays. For example, the following:

&AN = CreateArray(CreateArray(1, 2), CreateArray(3, 4), CreateArray(5, 6)).reverse⇒
();

results in &AN containing:

 ((5,6), (3,4), (1,2)

Parameters

None.

Returns

None.

Example

Suppose you had the following array.

Local Array of Sting &AS;
&AS = CreateArray("R", "O", "S", "E");

If you executed the Reverse method on this array, the elements would be ESOR.

Related Topics