Abs: Difference between revisions
Jump to navigation
Jump to search
Changing category name. |
No edit summary |
||
Line 1: | Line 1: | ||
ABS(''number'') | 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 == | |||
<pre> | <pre> | ||
REM | REM Abs Example | ||
' | 'Abs returns the absolute value of a number. | ||
PRINT " | PRINT "Abs(-2) = " & Abs(-2) | ||
PRINT " | PRINT "Abs(2) = " & Abs(2) | ||
</pre> | </pre> | ||
'''Output''' | '''Output''' | ||
<pre> | <pre> | ||
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