SW500010 Microchip Technology, SW500010 Datasheet - Page 272

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
QSORT
Synopsis
Description
The qsort() function is an implementation of the quicksort algorithm. It sorts an array of nel items,
each of length width bytes, located contiguously in memory at base. The argument func is a pointer
to a function used by qsort() to compare items. It calls func with pointers to two items to be com-
pared. If the first item is considered to be greater than, equal to or less than the second then func
should return a value greater than zero, equal to zero or less than zero respectively.
Example
272
#include <stdlib.h>
void qsort (void * base, size_t nel, size_t width,
int ( * func)(const void * , const void * ))
#include <stdio.h>
#include <stdlib.h>
int aray[] = {
};
int
sortem (const void * p1, const void * p2)
{
}
void
main (void)
{
567, 23, 456, 1024, 17, 567, 66
return * (int * )p1 - * (int * )p2;
register int i;
Library Functions

Related parts for SW500010