EasyManua.ls Logo

Texas Instruments TI-89 - Memucmp

Texas Instruments TI-89
1398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
978
Appendix A: System Routines — Strings
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
memucmp
Declaration:
int
memucmp
(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 assuming the values are unsigned chars.
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 similar to
memcmp
except the input values
are assumed to be
unsigned
chars.
< 0 If
buf1
is less than
buf2
.
= 0 If
buf1
is the same as
buf2
.
> 0 If
buf1
is greater than
buf2
.
Assumptions:
None
Side Effects:
None
Availability:
On AMS 2.00 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also: memcmp
Example:
This example shows the difference between
memcmp
and
memucmp
.
The output is as follows:
FF80 0002 FFFE
0080 FF02 00FE
int v1, v2, v3;
int v1u, v2u, v3u;
BYTE b255 = 255, b127 = 127, b1 = 1;
char buf[100];
v1 = memcmp( &b255, &b127, 1 ); v1u = memucmp( &b255, &b127, 1 );
v2 = memcmp( &b1 , &b255, 1 ); v2u = memucmp( &b1 , &b255, 1 );
v3 = memcmp( &b255, &b1 , 1 ); v3u = memucmp( &b255, &b1 , 1 );
sprintf( buf, "%04X %04X %04X\n%04x %04x %04x", v1, v2, v3, v1u, v2u, v3u );
DlgNotice( "memucmp", buf );

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals