Memucmp - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

978

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.
buf1
Inputs:
buf2
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
= 0
> 0
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
v3 = memcmp( &b255, &b1
sprintf( buf, "%04X %04X %04X\n%04x %04x %04x", v1, v2, v3, v1u, v2u, v3u );
DlgNotice( "memucmp", buf );
TI-89 / TI-92 Plus Developer Guide
— Pointer to first block to compare.
— Pointer to second block to compare.
— If buf1 is less than buf2 .
— If buf1 is the same as buf2 .
— If buf1 is greater than buf2 .
, 1 ); v3u = memucmp( &b255, &b1
Not for Distribution
Appendix A: System Routines — Strings
, &b255, 1 );
, 1 );
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents