|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Arrays and Data-Structures > !Collections/Fast Arrays > Fast Array-Commands > Smart Package Robot 's Collection Commands |
MiniRobotLanguage (MRL)
ARO.Array Reverse Order
Reverse he Order of the Elements from Array/Collection
Intention
This command reverses the order of the elements in a collection or array.
Although this does not seem to make sense for collections, it can be interesting for sorted arrays.
You can use this command to reverse the sort order.
Syntax
ARO.P1
Parameter Explanation
P1 - The collection identifier, typically a numeric value or a variable that contains a number from 0 to 1024/1025 to 2048.
Example
'***********************************
' ARO.-Sample
'***********************************
' This will reset the Collection "0"
CLC.0
' Now we add Elements to the Collection
$$NEW=Heinz
ATC.0|$$NEW
$$NEW=Peter
ATC.0|$$NEW
$$NEW=Karl
ATC.0|$$NEW
CGC.0|$$NUM
DBP.Collection 0 contains $$NUM Elements.
' We Reverse the Order.
ARO.0
CGE.0|1|$$RET
DBP.The firsst Element is now: $$RET
ENR.
Remarks
-
Limitations:
-
See also:
• CFV. - Collection from Variable
• CTV. - Collection to Variable
• RFC. - Remove from Collection