PCDIDE COMPILER Custom Computer Services Inc (CCS), PCDIDE COMPILER Datasheet - Page 180

PCD C-COMPILER PIC24, DSPIC

PCDIDE COMPILER

Manufacturer Part Number
PCDIDE COMPILER
Description
PCD C-COMPILER PIC24, DSPIC
Manufacturer
Custom Computer Services Inc (CCS)
Type
Compilerr
Datasheet

Specifications of PCDIDE COMPILER

For Use With/related Products
Microchip PIC24/dsPIC®
Lead Free Status / RoHS Status
Not applicable / Not applicable
Other names
429-1008
Examples:
Example Files:
Also See:
bsearch( )
Syntax:
Parameters:
Returns:
Function:
Availability:
Requires:
Examples:
Example Files:
Also See:
166
if( bit_test(x,3) || !bit_test (x,1) ){
}
if(data!=0)
// i now has the most significant bit in data
// that is set to a 1
ex_patg.c
bit_clear(),
ip = bsearch
(&key, base, num, width, compare)
key: Object to search for
base: Pointer to array of search data
num: Number of elements in search data
width: Width of elements in search data
compare: Function that compares two elements in search data
bsearch returns a pointer to an occurrence of key in the array pointed to by base. If
key is not found, the function returns NULL. If the array is not in order or contains
duplicate records with identical keys, the result is unpredictable.
Performs a binary search of a sorted array
All devices
#INCLUDE <stdlib.h>
int nums[5]={1,2,3,4,5};
int compar(const void *arg1,const void *arg2);
void main() {
}
int compar(const void *arg1,const void *arg2)
}
None
qsort()
for(i=31;!bit_test(data, i);i--) ;
int *ip, key;
key = 3;
ip = bsearch(&key, nums, 5, sizeof(int), compar);
if ( * (int *) arg1 < ( * (int *) arg2) return –1
else if ( * (int *) arg1 == ( * (int *) arg2) return 0
else return 1;
bit_set()
//either bit 3 is 1 or bit 1 is 0
{

Related parts for PCDIDE COMPILER