Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (a - d) abs(3)
NAME
abs - Computes absolute value of an integer
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <stdlib.h>
int abs(
int i);
PARAMETERS
i Specifies an integer.
DESCRIPTION
The abs( ) function returns the absolute value of its integer operand.
A two’s-complement integer can hold a negative number whose absolute value is too large for
the integer to hold. When given this largest negative value, the abs( ) function returns the same
value.
RETURN VALUES
The abs( ) function returns the absolute value of its argument.
RELATED INFORMATION
Functions: _abs(3), div(3), labs(3), ldiv(3), floor(3).
527187-017 Hewlett-Packard Company 15