Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (i - m) labs(3)
NAME
labs - Computes absolute value of long 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>
long labs(
long i);
PARAMETERS
i Specifies a long integer.
DESCRIPTION
The labs( ) function returns the absolute value of its long integer operand.
The labs( ) function performs the same function as the abs( )function, but accepts a long integer
rather than an integer as its parameter.
A two’s-complement integer can hold a negative number whose absolute value is too large for
the integer to hold.
RETURN VALUES
The labs( ) function returns the absolute value of its argument.
RELATED INFORMATION
Functions: _abs(3), abs(3), floor(3).
527187-017 Hewlett-Packard Company 4−81