PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Numeric Value
  • Decimal separator
  • Precision
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
Returns the rounded value of a numeric value according to the specified number of decimal places.
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 rounded value of -16.238167
ResRound = Round(-16.238167, 2)
// Returns -16.24
Syntax
<Result> = Round(<Numeric Value> [, <Number of Decimals>])
<Result>: Integer or real
Rounded value of the specified numeric value.
<Numeric Value>: Real or currency
Numeric value to round. We recommend that you use the currency type in order to get reliable results.
<Number of Decimals>: Optional integer
Number of decimals to return. No decimal is returned if this parameter is not specified.
Remarks

Numeric Value

If <Numeric Value> is included between:
  • 0 and 0.49: the number is rounded to 0. For example, 3.2 is rounded to 3 (no decimal).
  • 0.5 and 0.99: the number is rounded to 1. For example, 3.7 is rounded to 4 (no decimal).
Caution: The rounding performed with the "Real" type is not precise. Indeed, the operations performed with the "real" types are not precise because of the computing representation of reals. To get an exact rounding, we recommend that you use the Currency or Numeric type that is using an exact memory representation. See the real type for more details.

Decimal separator

The decimal separator for the real numbers is "." (dot).

Precision

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
vou mostrar funcao round
BOM DIA

Nessa aula de hoje

vou mostrar funcao round

EDT_RESULTADO=EDT_a*EDT_b

EDT_RESULTADO1=Round(EDT_a*EDT_b,2)

Info(EDT_RESULTADO)

Info(EDT_RESULTADO1)

// BLOG COM VIDEO E EXEMPLO

http://windevdesenvolvimento.blogspot.com.br/2017/06/aula-1193-windev-comandos-014-round.html

https://www.youtube.com/watch?v=S8TjTGZEU_M

De matos
Jul. 01 2017