SW500008 Microchip Technology, SW500008 Datasheet - Page 259

PICC-18 STD

SW500008

Manufacturer Part Number
SW500008
Description
PICC-18 STD
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500008

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Standard
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015
778-1001
778-1001
Library Functions
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
#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;
245

Related parts for SW500008