; ; ------------------------------------------------------------ ; ; PureBasic - Sort (Numerical) example file ; ; (c) 2001 - Fantaisie Software ; ; ------------------------------------------------------------ ; ; Change the number of elements here, to see the speed of the sort routine :) ; #NbElements = 100 Dim Array.b(#NbElements) For k=0 To #NbElements Array(k) = Random(10000) Next OpenConsole() ; Fill the array with lot of random number ; For k=0 To #NbElements Print(Str(Array(k))+" ") Next ; Sort the whole array ! ; SortArray(Array(), 0) PrintN("") PrintN("") For k=0 To #NbElements Print(Str(Array(k))+" ") Next MessageRequester("Sort Example","Sort finished.",0) End ; ExecutableFormat=Windows ; Executable=C:\Sort.exe ; DisableDebugger