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 <stdlib.h>
    #define max(a,b)  (((a) > (b)) ? (a) : (b))

Description:
    The max macro will evaluate to be the greater of two values.  It is
    implemented as follows.


         #define max(a,b)  (((a) > (b)) ? (a) : (b))


Returns:
    The max macro will evaluate to the larger of the two values passed.

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

    void main()
      {
        int a;

        /*
         * The following line will set the variable "a" to 10
         * since 10 is greater than 1.
         */
        a = max( 1, 10 );
        printf( "The value is: %d\n", a );
      }

Classification:
    WATCOM

Systems:
    All, Netware

See Also:
    min

See Also: min

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