The arrayreverse( function reverses the order of the elements in a text array or a data array (see Text Arrays and Data Arrays).
Parameters
This function has two parameters:array – The array that you want to reverse.
separator – Is the separator character for this array. This parameter is omitted if the target array is a data array.
Description
This function reverses the order of the elements in an array. In other words, the first element becomes the last element, the second element becomes the second to last, etc.
arrayreverse("Red,Green,Blue",",") ☞ Blue,Green,Red
arrayreverse("Now is the time"," ") ☞ time the is Now
This function works with both data and text arrays. Because Data Arrays have no separators between elements, the separator parameter is omitted when targeting a data array.
Suppose we have a data array, myDataArray, defined as below (noting that a data array can contain text, numeric, binary and other data types):
myDataArray = dataarray(3,"hello",49,43,7.21,"blue")
Then
arrayreverse(myDataArray) ☞ blue, 7.21, 43, 49, hello, 3
See Also
History
Version | Status | Notes |
10.0 | No Change | Carried over from Panorama 6.0 |