Abs: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Created page with "== ABS Function == ABS(''number'') '''Description''' ABS returns the absolute value, or unsigned magnitude, of a numeric expression. The required parameter, ''number'', is ..."
 
No edit summary
Line 9: Line 9:
'''Example'''
'''Example'''


<pre>
REM ABS Example
REM ABS Example
'ABS returns the absolute value of a number.
'ABS returns the absolute value of a number.
PRINT "ABS(-2) = " & ABS(-2)
PRINT "ABS(-2) = " & ABS(-2)
PRINT "ABS(2) = " & ABS(2)
PRINT "ABS(2) = " & ABS(2)
 
</pre>
'''Output'''
'''Output'''


<pre>
ABS(-2) = 2
ABS(-2) = 2
ABS(2) = 2
ABS(2) = 2
</pre>


'''Related Items'''
'''Related Items'''


[[sgn|SGN]]
[[sgn|SGN]]

Revision as of 17:02, 20 June 2012

ABS Function

ABS(number)

Description

ABS returns the absolute value, or unsigned magnitude, of a numeric expression. The required parameter, number, is any valid numeric expression. If number is NULL, ABS returns NULL.

Example

REM ABS Example
'ABS returns the absolute value of a number.
PRINT "ABS(-2) = " & ABS(-2)
PRINT "ABS(2) = " & ABS(2)

Output

ABS(-2) = 2
ABS(2) = 2

Related Items

SGN