labs(S) 6 January 1993 labs(S) Name labs - converts to absolute value Syntax cc . . . -lc #include <stdlib.h> long labs (n) long n; Description The labs function produces the absolute value of its long-integer argu- ment n. Return value The labs function returns the absolute value of its argument. There is no error return. Example #include <stdlib.h> #include <stdio.h> main() { long x,y; x = -41567L; y = labs(x); printf("The labs (%ld) = %ld \n", x, y); } This program uses labs to get and display the absolute value of -41,567. See also abs(S), fabs(S) Standards conformance labs is conformant with: ANSI X3.159-1989 Programming Language -- C.