SW500009 Microchip Technology, SW500009 Datasheet - Page 224

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
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
210
#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);
Library Functions

Related parts for SW500009