Concept Framework 2.0 documentation Contents | Index

standard.C.math.labs

Name Version Deprecated
labs version 1.0 no

Prototype:
number labs(number n)

Parameters:
n      [in] Long-integer number whose absolute value is to be calculated

Description:
Returns the absolute value of its argument.

Example:
import standard.C.math

class Main {
     function Main() {
          var n = -4; 
          var ln = -2147483600 ; 
          var fn = -32.34; 
          echo "The absolute value of " + n + " is " + abs(n)+"\n";
          echo "The absolute value of " + ln + " is " + labs(ln)+"\n";
          echo "The absolute value of " + fn + " is " + fabs(fn)+"\n";
     }
} 
 

Results 
The absolute value of -4 is 4
The absolute value of -2147483600 is 2147483600
The absolute value of -32.340000000000003 is 32.340000000000003
 

Returns:
Returns the absolute value of its argument.

Documented by Simona Gabriela Plesuvu, generation time: Fri Jan 21 18:06:18 2011 GMT(c)2011 RadGs Software