Documents
Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference

sort()

Sorts the values in the given array. Since this function modifies the passed array, you must not pass a const or read-only array variable.

Function Prototype

sort(array, [descending])

Arguments

Argument Name Data Type Description
array Array Variable The array variable to be sorted.
[required]
descending Integer Number Defines in which order the array shall be sorted.
0: The values are sorted in ascending order.
1: The values are sorted in descending order.
[optional, default: 0]

Return Value

None.

Examples

None yet.

See also

search(), array_equal()

Availability

Since LinuxSampler 2.0.0.svn52.

Dynamic, optional arguments are only supported by NKSP. If you want to retain compatibility to KSP, then you should always pass a parameter for the 2nd argument of this function.

Document Updated:  2019-09-16  |  Author:  Christian Schoenebeck