Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
Guardian Native C Library Calls (j - 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 native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
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.
Atwo’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).
527192-005 Hewlett-Packard Company 4−11