Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <string.h>
    int memcmp( const void *s1,
                const void *s2,
                size_t length );
    int _fmemcmp( const void __far *s1,
                  const void __far *s2,
                  size_t length );

Description:
    The memcmp and _fmemcmp functions compare the first length characters of
    the object pointed to by s1 to the object pointed to by s2.

    The _fmemcmp function is a data model independent form of the memcmp
    function that accepts far pointer arguments.  It is most useful in mixed
    memory model applications.

Returns:
    The memcmp and _fmemcmp functions return an integer less than, equal to,
    or greater than zero, indicating that the object pointed to by s1 is
    less than, equal to, or greater than the object pointed to by s2.

See Also:
    memchr, _fmemchr, memcpy, _fmemcpy, memicmp, _fmemicmp, memset, _fmemset

Example:
    #include <stdio.h>
    #include <string.h>

    void main()
      {
        auto char buffer[80];

        strcpy( buffer, "world" );
        if( memcmp( buffer, "Hello ", 6 ) < 0 ) {
          printf( "Less than\n" );
        }
      }

Classification:
    memcmp is ANSI, _fmemcmp is not ANSI

Systems:
     memcmp - All

    _fmemcmp - All

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson