Liberty BASIC Help Online

ABS( n )
 
Description:
This function returns  | n |  (the absolute value of n).  "n" can be a number or any numeric expression.
 
Usage:
 
print abs( -5 )      produces: 5
 
print abs( 6 - 13 )  produces: 7
 
print abs( 2 + 4 )   produces: 6
 
print abs( 3 )       produces: 3
 
print abs( 3/2 )     produces: 1.5
 
print abs( 5.75 )    produces:  5.75


Copyright (C) 2003 Shoptalk Systems
Liberty BASIC - http://www.libertybasic.com/