Returns the absolute value of the specified numeric expression.
ABS(nExpression) |
Parameters
- nExpression
-
Specifies the numeric expression whose absolute value ABS( ) returns.
Return Value
Numeric
Example
Copy Code | |
|---|---|
? ABS(-45) && Displays 45 ? ABS(10-30) && Displays 20 ? ABS(30-10) && Displays 20 STORE 40 TO gnNumber1 STORE 2 TO gnNumber2 ? ABS(gnNumber2-gnNumber1) && Displays 38 | |
See Also
Reference
INT( ) FunctionROUND( ) Function
SIGN( ) Function
Other Resources
FunctionsLanguage Reference (Visual FoxPro)
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08