EasyManuals Logo
Home>Texas Instruments>Computer Hardware>TMS34010

Texas Instruments TMS34010 Reference Guide

Texas Instruments TMS34010
181 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #101 background imageLoading...
Page #101 background image
bsearch
Syntax
Array
Search
#include
<stdlib.h>
void
*bsearch(key,
base,
nmemb,
size,
compar)
void
*key,
*base;
size_t
nrnemb,
size;
int
(*cornpar){);
Defined
in
bsearch.
c in
rts.
src
Description
The bsearch function searches through
an
array
of
nmemb objects for a
member that matches the object that
key
points to. Argument
base
points
to
the first member in the array;
size
specifies the size (in bytes)
of
each
member.
6-26
The contents
of
the array must
be
in
ascending, sorted order.
If
a match
is
found, the function returns a pointer
to
the matching member
of
the array;
if
no match
is
found, the function returns a null pointer
(0).
Argument
cornpar
points
to
a function that compares
key
to the array el-
ements. The comparison function should
be
declared
as:
int
cmp(ptrl,
ptr2)
void
*ptrl,
*ptr2;
The cmp function compares the objects that
ptrl
and
ptr2
point to, and
returns one
of
the
following
values:
< 0
if
*ptrl
is
less
than
*ptr2.
o
if
*ptrl
is
equal
to
*ptr2.
> 0
if
*ptrl
is
greater than
*ptr2.

Table of Contents

Other manuals for Texas Instruments TMS34010

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS34010 and is the answer not in the manual?

Texas Instruments TMS34010 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS34010
CategoryComputer Hardware
LanguageEnglish

Related product manuals