Asort – Visara Master Console Center Scripting Guide User Manual
Page 80

Chapter 5 Script Commands
Scripting Guide
80
ASORT
Syntax:
ASORT( NormArray, %Direction)
Description:
Sort a normal array.
Action:
The data elements in the specified array are sorted, in ascending or
descending order, as specified by the Direction parameter.
Parameters:
NormArray. Normal array variable. The normal array to sort. Can
be a string or integer array.
Direction. Integer expression. Indicates the order in which to sort
the data—ascending or descending. Valid constants are ASC for
ascending and DESC for descending.
Returns:
N/A.
Notes:
The array is sorted “in-place”. The order of the original array is lost.
Example:
ASSOCKEYS( $AssocArray, $Keys)
ASORT( $Keys, ASC)
// now we can traverse the associative array in a
// consistent order
See Also: