LABS(3,L) AIX Technical Reference LABS(3,L) ------------------------------------------------------------------------------- labs PURPOSE Returns the absolute value of long integers. LIBRARY Standard C Library (libc.a) SYNTAX long labs (n); long n; DESCRIPTION The labs function produces the absolute value of its long integer argument n. There is no error-return value. The result is undefined when the argument is the least of the negative long integers (for example, -2147483648 on OS/2), whose absolute value cannot be represented as a long integer. The value of the minimum allowable integer is stored in "LONG_MIN" in the limits.h include file. EXAMPLE This example computes "y" as the absolute value of the long integer -41567. #include long x, y; x = -41567L; y = labs (x); /* y = 41567L */ Processed November 7, 1990 LABS(3,L) 1