![]() |
|
| << Previous | Next >> | |
| | |
NEAR SYNTAX: int _n_memcmp( void *s1, void *s2, size_t n );
FAR SYNTAX: int _f_memcmp( void far *s1, void far *s2, size_t n );
NOTE By default, memcmp()is defined to_n_memcmp().Description
- Performs unsigned character by character comparison of two memory blocks of length
n.
- For Rabbit 4000+ users, this function supports FAR pointers. By default the near version of the function is called. The macro
USE_FAR_STRINGwill change all calls to functions in this library to their far versions. The user may also explicitly call the far version with_f_strfuncwherestrfuncis the name of the string function.
- Because FAR addresses are larger, the far versions of this function will run slightly slower than the near version. To explicitly call the near version when the
USE_FAR_STRINGmacro is defined and all pointers are near pointers, append_n_to the function name, e.g.,_n_strfunc. For more information about FAR pointers, see the Dynamic C User's Manual or the samples inSamples/Rabbit4000/FAR/.Parameters
- s1
- Pointer to block 1.
- s2
- Pointer to block 2.
- n
- Maximum number of bytes to compare.
Return value
<0: A character instr1is less than the corresponding character instr2.
0:str1is identical tostr2.
>0: A character instr1is greater than the corresponding character instr2.Library
- STRING.LIB
See also
- strncmp
| Dynamic C Functions | << Previous | Next >> | rabbit.com |