Abs: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Changing category name.
Brendon (talk | contribs)
No edit summary
Line 1: Line 1:
ABS(''number'')
ABS(''number'')


'''Description'''
== 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.
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'''
== Example ==


<pre>
<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>
</pre>
'''Output'''
'''Output'''


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



Revision as of 20:08, 8 August 2012

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