This content has been translated automatically.  Click here  to view the French version.
  • Decimal separator
  • Precision of the reals
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Abs (Function)
In french: Abs
Returns the absolute value:
  • of a numerical value,
  • of a numerical expression (integer or real).
  • New in version 28
    of a duration.
// Récupération de la valeur absolue
ResValeurAbsolue = Abs(-16.23) // Renvoie 16.23
ResValeurAbsolue = Abs(4.51 + 16.23) // Renvoie 20.74
New in version 28
// Récupération de la valeur absolue
ResValeurAbsolue is Duration = Abs(5 min) // Renvoie 0000500000
ResValeurAbsolue = Abs(-15 min) // Renvoie 0001500000
<Result> = Abs(<Manipulated value>)
<Result>: Full, Real or Duration
Sought absolute value.
<Manipulated value>: Numerical expression, integer, real or time
Value to handle:
  • Numerical expression,
  • Numeric value,
  • New in version 28
    • Duration variable containing the duration in "+DHHMMSSCCC" format (D corresponds to the number of days, HH to hours, MM to minutes, SS to seconds and CCC to milliseconds).
    • Duration in a readable format (e.g., 1 d 2 h 3 min 10 s 10 ms).

Decimal separator

The decimal separator for the real numbers is the one defined in the control panel of Windows.
WindowsLinuxUniversal Windows 10 AppJavaUser 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:
rValeur is 4-byte real = -1.70
Trace(Abs(rValeur)) // Affiche 1.700000047684
To avoid this type of problem, we advise you to use reals (without specifying the size) or currencies.
Business / UI classification: Neutral code
Component: wd280mat.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment