Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
_max(3) OSS Library Calls Reference Manual
NAME
_max - Expands the greater of its two arguments
LIBRARY
None. This application program interface is implemented as a macro.
SYNOPSIS
#include <stdlib.h>
arith_type _max(
arith_type expr1,
arith_type expr2);
PARAMETERS
arith_type Specifies the type of expr1, expr2, and the return value. Any arithmetic type can
be specified. However, they must all be of the same type.
expr1 Is an expression.
expr2 Is an expression of the same type as expr1. This is an optional parameter.
DESCRIPTION
_max is a macro that expands to the greater of its two arguments.
Because _max is a macro, avoid specifying expressions with side effects as arguments.
EXAMPLES
This example prints "The maximum number is 7.000000":
#include <stdlibh>
.
#include <stdioh>
.
int main(void)
{
double r, x, y;
x = 5.0;
y = 7.0;
r = _max(x, y);
printf("The maximum number is %f.", r);
}
RETURN VALUES
The _max( ) macro the numerically greater of the two arguments, expr1 and expr2.
RELATED INFORMATION
Functions: _min(3).
4−174 Hewlett-Packard Company 527187-017