parrotcode: simple sort algorithm implemented in PIR | |
Contents | Libraries |
Data::Sort - simple sort algorithm implemented in PIR
...
load_bytecode "library/Data/Sort.pir"
.local pmc sort
sort = find_global "Data::Sort", "simple"
sort( array_pmc )
...
Sort the specified array.
Note: The cmp
op is used to compare the array elements. If the sorting is done, "cmp val, array[i], array[i+1]" results in -1, or 0 if both values are equal, for all values of i in range 0 <= i < array_size-1.
This library provides the following function:
array
Jens Rieks <parrot at jensbeimsurfen dot de> is the author and maintainer. Please send patches and suggestions to the Perl 6 Internals mailing list.
Copyright (c) 2004, the Perl Foundation.
|