__max

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at __max.

Returns the larger of two values.

type __max(  
   type a,  
   type b   
);  

Parameters

type
Any numeric data type.

a, b
Values of any numeric type to be compared.

__max returns the larger of its arguments.

The __max macro compares two values and returns the value of the larger one. The arguments can be of any numeric data type, signed or unsigned. Both arguments and the return value must be of the same data type.

RoutineRequired header
__max<stdlib.h>

For more information, see the example for __min.

System::Math::Max

Floating-Point Support
__min

Show: