MudOSa4DGD/
MudOSa4DGD/bin/
MudOSa4DGD/data/
MudOSa4DGD/doc/
MudOSa4DGD/doc/driver/
MudOSa4DGD/doc/efun/bitstrings/
MudOSa4DGD/doc/efun/command/
MudOSa4DGD/doc/efun/communication/
MudOSa4DGD/doc/efun/heart_beat/
MudOSa4DGD/doc/efun/interactive/
MudOSa4DGD/doc/efun/inventory/
MudOSa4DGD/doc/efun/living/
MudOSa4DGD/doc/efun/mappings/
MudOSa4DGD/doc/efun/strings/
MudOSa4DGD/doc/efun/uid/
MudOSa4DGD/doc/funs/
MudOSa4DGD/doc/language/
MudOSa4DGD/mudlib/dgd/doc/
MudOSa4DGD/mudlib/dgd/lib/include/dgd/
MudOSa4DGD/mudlib/dgd/lib/std/
MudOSa4DGD/mudlib/dgd/lib/sys/
MudOSa4DGD/mudlib/dgd/log/
MudOSa4DGD/mudlib/log/
MudOSa4DGD/mudlib/std/include/
MudOSa4DGD/mudlib/std/obj/
NAME
	sort_array - sort an array

SYNOPSIS
	varargs mixed *sort_array(mixed *arr, mixed fun, mixed ob, int dir)


DESCRIPTION
	This function will returned the sorted array sorted through
	function fun in object ob and in the direction specified by dir. If
	dir is positive it will sort in ascending order, or else the array
	will be sorted in descending order. The fun and ob arguments are
	optional, and defaults to standard sorting functions for strings,
	ints and floats, though the array should not consist of a blend of
	numbers and strings. Dir defaults to ascending order.

	The result of the ob->fun(arr[x], arr[y]) must return a number
	comparable to zero to specify if the first argument is greater,
	equal or lesser than the second argument.

NOTE
	If config.h defines MUDOS_BUBBLE_SORT_ARRAY, the sort technique
	will be Bubblesort with inner loop. The default sorting algorithm
	is however Quicksort with a local stack. It was found to be
	much faster for the average array, even with as little as 10
	elements. Total executiontime depends heavily on the size of the
	array and how "unordened" it is (varies with algorithm deployed).

SEE ALSO
	efun/arrays/, efun/strings/