Appendix A: System Routines — Strings
977
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
memcmp
Declaration:
int
memcmp
(const void *
buf1
, const void *
buf2
, size_t
length
)
Category(ies):
Strings, Utilities
Description:
Compares
length
bytes of
buf1
against
buf2
and returns the result of the
compare.
Inputs:
buf1
— Pointer to first block to compare.
buf2
— Pointer to second block to compare.
length
— Number of bytes to compare.
Outputs:
An integer value is returned as follows.
< 0 — If
buf1
is less than
buf2
.
= 0 — If
buf1
is the same as
buf2
.
> 0 — If
buf1
is greater than
buf2
.
Note that the return value is the result of subtracting the first pair of values
that differ in the two blocks being compared based on them being
signed
chars. Compare this to
memucmp
which computes the difference based
on the values being unsigned chars.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also: memchr, memucmp, strcmp
Example:
See
memucmp
and
FSetPos
.