WINDEV, WEBDEV AND WINDEV MOBILEONLINE HELPVersion: 1516171819202122232425
 Home | Sign in | English
 The currency typeNotesDefault valueBinary coding of realsThousand separatorCalculations on currenciesExternal language WINDEV WEBDEV WINDEV Mobile Others The currency type A currency is a real coded on 10 bytes.A currency can contain up to 23 significant digits (17 for the integer part and 6 for the decimal part) and it can take a value included between -604 462 909 807 314 587, 353 087 and +604 462 909 807 314 587, 353 087.The currency type is recommended to avoid the rounding errors caused by the binary coding of reals.Remarks:For a better precision, we recommend that you use the numerics (38 significant digits).For the other calculations, we recommend that you use the reals.Versions 16 and later This type of variable is now available for Windows Phone 7 applications.New in version 16 This type of variable is now available for Windows Phone 7 applications. This type of variable is now available for Windows Phone 7 applications.Versions 18 and later This type of variable is now available in Windows Store apps mode. New in version 18 This type of variable is now available in Windows Store apps mode. This type of variable is now available in Windows Store apps mode. Versions 21 and later This type of variable is now available in Universal Windows 10 App mode.New in version 21 This type of variable is now available in Universal Windows 10 App mode. This type of variable is now available in Universal Windows 10 App mode.Notes Default valueA "Currency" variable that is declared but not initialized is equal to 0.To force the assignment of a currency, use 0m in front of the value. For example: num1 is currencynum1 = 0m12345678901234567891234567Trace(num1) Binary coding of realsAll the reals have the same number of significant digits (15).If the result of a calculation performed on reals involves more than 15 significant digits, this result will be automatically rounded to 15 significant digits. The precision of the result will be less than the precision of a calculation performed with the currency type.The numerics provide an even greater precision (32 digits for the integer part and 6 digits for the decimal part).Versions 23 and laterThousand separatorYou can use spaces and underscore characters to separate thousands in numbers. For example: num1 is currencynum1 = 123 456.478num2 is currencynum2 = 568_014.478 New in version 23Thousand separatorYou can use spaces and underscore characters to separate thousands in numbers. For example: num1 is currencynum1 = 123 456.478num2 is currencynum2 = 568_014.478 Thousand separatorYou can use spaces and underscore characters to separate thousands in numbers. For example: num1 is currencynum1 = 123 456.478num2 is currencynum2 = 568_014.478 Calculations on currenciesAll the calculations that use at least one currency will be performed in currency format. For a better precision of the result, all the operands will be automatically converted into currency.Caution: Change of behavior between version 12 and version 14: In version 12, when a real was multiplied by a currency, the calculation was performed on reals.From version 14, when a real is multiplied by a currency, the calculation is performed on currencies.Remark: For better precision, we recommend that you use the Numeric type to perform calculations.External languageThe currency type is not available in external language. Minimum version required Version 9 This page is also available for…
 Comments
 Click [Add] to post a comment
 Registered trademarks. Copyright ©2009-2020 PC SOFT. All rights reservedThis website has been developed with WEBDEV and HFSQLWEBDEV, WINDEV Mobile and WINDEV programming