Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (H-K)
Guardian Procedure Calls Reference Manual—522629-013
7-8
HEAPSORTX_ Procedure
HEAPSORTX_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
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
•
compare-function 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, earlier in this subsection.
Syntax for TAL Programmers
Parameters
error returned value
INT
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 );
error := HEAPSORTX_ ( array ! i,o
,num-elements ! i
,size-of-element ! i
,compare-proc ! i
,[ pointer-array ] ); ! i