Texas Instruments TI89 Developer Guide - Page 1020
Ff80 0002 Fffe
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 1020 highlights
978 Appendix A: System Routines - Strings 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 ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/1020.png)