Navigation:  Appendices > Macro Language > Built-in Functions > All Functions (Alphabetical) >


Previous pageReturn to chapter overviewNext page

int = Abs(nNumber)


This macro function takes an integer as parameter and returns the absolute value of nNumber. The absolute value of a number is the same number if that number is positive, or its negative if the number is negative.


 Abs(20) // 20

 Abs(-30) // 30

 Abs(0) // 0


Note that the following is always true :


 nNumber == Sign(nNumber) * Abs(nNumber)


See also : Sign.

Topic 174325 updated on 01-Nov-2016.
Topic URL: http://www.qppstudio.net/webhelp/index.html?abs.htm