PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Decimal separator
  • Precision of the reals
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Abs (Function)
In French: Abs
Returns the absolute value of a numeric value or numeric expression (integer or real).
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Retrieve the absolute value
ResAbsoluteValue = Abs(-16.23) // Returns 16.23
ResAbsoluteValue = Abs(4.51 + 16.23) // Returns 20.74
Syntax
<Result> = Abs(<Numeric>)
<Result>: Integer or real
Sought absolute value.
<Numeric>: Numeric expression, integer or real
Numeric expression or numeric value to use.
Remarks

Decimal separator

The decimal separator for the real numbers is the one defined in the control panel of Windows.
Reports and QueriesWindowsLinuxWindows MobileUniversal Windows 10 AppJavaPHPAjaxUser code (UMC)Stored procedures

Precision of the reals

If the parameter passed to the function is a real, the result is always an 8-byte real.
If the parameter passed to the function is a 4-byte real, the result will be considered as being an 8-byte real, which may result in additional decimal places when displaying the number. For example:
rValue is 4-byte real = -1.70
Trace(Abs(rValue)) // Displays 1.700000047684
To avoid this type of problem, we advise you to use reals (without specifying the size) or currencies.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230mat.dll
Windows Mobile wp230mat.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230mat.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment