TITLE ^

Data::Sort - simple sort algorithm implemented in PIR

SYNOPSIS ^

    ...

    load_bytecode "library/Data/Sort.imc"

    .local pmc sort

    sort = find_global "Data::Sort", "simple"

    sort( array_pmc )

    ...

DESCRIPTION ^

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.

FUNCTIONS ^

This library provides the following function:

simple( array )

A simple array sort function.

array

This is the array pmc to be sorted.

This function returns nothing.

AUTHOR ^

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 ^

Copyright (c) 2004, the Perl Foundation.


parrot