pjs.sortArray()
Sorts the elements in the specified array, table, or multiple-occurrence data structure. Ascending by default, with optional descending parameter.
Parameters
Array, table, or multiple-occurrence data structure.
Descending boolean flag (optional)
Example
pjs.define("arr", { type: 'char', length: 1, dim: 3 });
arr[1] = 'b';
arr[2] = 'c';
arr[3] = 'a';
pjs.sortArray(arr); // Sort ascending
pjs.sortArray(arr, true); // Sort descending
RPG Equivalent
SORTA
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!