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 min(a,b)  (((a) < (b)) ? (a) : (b))

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


         #define min(a,b)  (((a) < (b)) ? (a) : (b))


Returns:
    The min macro will evaluate to the smaller 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 1
         * since 10 is greater than 1.
         */
        a = min( 1, 10 );
        printf( "The value is: %d\n", a );
      }

Classification:
    WATCOM

Systems:
    All, Netware

See Also:
    max

See Also: max

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