Guardian Procedure Calls Reference Manual

HEAPSORTX_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
Example
Related Programming Manual
Summary
The HEAPSORTX_ procedure is used to sort an array of equal-sized elements in place.
Syntax for C Programmers
NOTE: In the TNS/E environment, the CEXTDECS file uses the int data type for 32-bit values.
This is a change from the TNS and TNS/R environments where CEXTDECS uses the long data
type for 32-bit values.
#include <cextdecs(HEAPSORTX_)>
short HEAPSORTX_ ( short *array
,__int32_t num-elements
,short size-of-element
,short (*) ()compare-function
,[ __int32_t _far *pointer-array ] );
The compare-function parameter is an application-supplied comparison function that must
be written in C. It must return values as described under the compare-proc parameter in
the TAL syntax.
Syntax for TAL Programmers
error := HEAPSORTX_ ( array ! i,o
,num-elements ! i
,size-of-element ! i
,compare-proc ! i
,[ pointer-array ] ); ! i
Parameters
array
input, output
INT .EXT:ref:*
contains equal-sized elements to be sorted.
num-elements
input
INT(32):value
is the number of elements in array.
HEAPSORTX_ Procedure 695