4.3BSD-UWisc/man/cat3/qsort.3f




QSORT(3F)           UNIX Programmer's Manual            QSORT(3F)



NAME
     qsort - quick sort

SYNOPSIS
     subroutine qsort (array, len, isize, compar)
     external compar
     integer*2 compar

DESCRIPTION
     One dimensional _a_r_r_a_y contains the elements to be sorted.
     _l_e_n is the number of elements in the array.  _i_s_i_z_e is the
     size of an element, typically -

          4 for integer and real
          8 for double precision or complex
          16 for double complex
          (length of character object) for character arrays

     _C_o_m_p_a_r is the name of a user supplied integer*2 function
     that will determine the sorting order.  This function will
     be called with 2 arguments that will be elements of _a_r_r_a_y.
     The function must return -

          negative if arg 1 is considered to precede arg 2
          zero if arg 1 is equivalent to arg 2
          positive if arg 1 is considered to follow arg 2

     On return, the elements of _a_r_r_a_y will be sorted.

FILES
     /usr/lib/libU77.a

SEE ALSO
     qsort(3)





















Printed 12/27/86          May 15, 1985                          1