Header File
stdlib.h
Category
Math Routines
Prototype
long labs(long int x);
Description
Gives long absolute value.
labs computes the absolute value of the parameter x.
Return Value
labs returns the absolute value of x.
Example
#include <stdio.h> #include <math.h> int main(void) { long result; long x = -12345678L; result= labs(x); printf("number: %ld abs value: %ld\n", x, result); return 0; }
Portability
POSIX |
Win32 |
ANSI C |
ANSI C++ |
+ |
+ |
+ |
+ |
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|