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 Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <string.h>
    int bcmp(const void *s1, const void *s2, size_t n);

Description:
    The bcmp function compares the byte string pointed to by s1 to the
    string pointed to by s2.  The number of bytes to compare is specified by
    n.  Null characters may be included in the comparision.

    Note that this function is similar to the ANSI  memcmp function but just
    tests for equality (new code should use the ANSI function).

Returns:
    The bcmp function returns zero if the byte strings are identical
    otherwise it returns 1.

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

    void main()
      {
        if( bcmp( "Hello there", "Hello world", 6 ) ) {
          printf( "Not equal\n" );
        } else {
          printf( "Equal\n" );
        }
      }

    produces the following:

    Equal

Classification:
    WATCOM

Systems:
    All, Netware
See Also:
    bcopy, bzero, memcmp, strcmp

See Also: bcopy bzero

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