You want to sort data in an array. For a report, for example.
Use a proc in the explanation section of this pattern. Note: the array passed into the proc is processed in-place. Its original order is lost. If you want to keep the original order, make of copy of the array before you sort it.
This proc will sort an array in-place. That is, the original order will be lost.
If you need to keep the original order, make a copy of the array before you sort it.