SW500010 Microchip Technology, SW500010 Datasheet - Page 251

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
Library Functions
MEMCHR
Synopsis
Description
The memchr() function is similar to strchr() except that instead of searching null terminated strings,
it searches a block of memory specified by length for a particular byte. Its arguments are a pointer
to the memory to be searched, the value of the byte to be searched for, and the length of the block.
A pointer to the first occurrence of that byte in the block is returned.
Example
#include <string.h>
/ * For baseline and midrange processors * /
const void * memchr (const void * block, int val, size_t length)
/ * For high-end processors * /
void * memchr (const void * block, int val, size_t length)
#include <string.h>
#include <stdio.h>
unsigned int ary[] = {1, 5, 0x6789, 0x23};
void
main (void)
{
}
char * cp;
cp = memchr(ary, 0x89, sizeof ary);
if(!cp)
else
printf("not found\n");
printf("Found at offset %u\n", cp - (char * )ary);
251

Related parts for SW500010