basic.sort
Sorts a string of attributes or values.
Syntax
sort(string.expression) sort(string.expression, ac.expression, vc.expression, sequence.expression)
Description
sorts a attribute or value mark delimited string.expression in ascending order.
If the expression contains both attribute and value marks, this function replaces all marks with the type first encountered.
On versions of AP 6.2.0 and above, a second sort function is available that works in a manner similar to the 'locate' statement. On this expanded version, the user may specify in which attribute, and or value the list resides as well as the sort sequence to use.
Example
equ vm to char(253)
list='zebra':vm:'albatross':vm:'gooney
bird':vm:'elephant'
newlist=sort(list)
The variable 'newlist' contains the string:
albatross]elephant]gooney bird]zebra
The ']' (bracket) represents a value mark.
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
