PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
NumberInWords (Function)
In french: NombreEnLettres
Transforms a number into a character string corresponding to the number "written in words".
The result of the conversion is:
  • expressed in French if the runtime language of the application is French. If the language of the operating system is Belgium, the "septante", "quatre-vingts" and "nonante" notations will be used.
  • expressed in English in all the other cases.
Example
Info(NumberInWords(83.335))
// Displays "eighty three point thirty four"

Info(NumberInWords(1.10, "Euro(s)"))
// Displays "one Euro ten"

Info(NumberInWords(1.01, "dollar(s)", "cent(s)"))
// Displays "one dollar and one cent"
Syntax
<Result> = NumberInWords(<Number to Transform> [, <Unit> [, <Name of Hundredths>]])
<Result>: Character string
Number expressed in words.
<Number to Transform>: Currency
Number to transform into character string. The number that must be expressed in words has the following characteristics:
  • 23 significant digits: up to 17 digits for the integer part, up to 6 digits for the decimal part.
  • can be included in the interval for defining the currencies: between -604 462 909 807 314 587,353 087 and +604 462 909 807 314 587,353 087.
<Unit>: Optional character string (with quotes)
Unit that must be used in the result: Dollars, Euros, ... You have the ability to specify a letter "s" between brackets ("(s)" for example) if the name of the currency takes a "s" in the plural.
If this parameter is not specified, the following string will be used:
  • "comma" in French: for example: "ten comma twenty-five".
  • "point" in English: for example: "ten point twenty-five".
<Name of Hundredths>: Optional character string (with quotes)
Name of the hundredths that will be used in the result. You have the ability to specify a letter "s" between brackets ("(s)" for example) if the name of the hundredths takes a "s" in the plural.
Remarks
  • The decimal part is rounded to 2 digits.
  • In English, the large numbers use the American rules:
    Number (Power of 10)Unit used in FrenchUnit used in English (American)
    10 power 6millionmillion
    10 power 9billionbillion
    10 power 12billiontrillion
    10 power 15billiardquadrillion
Related Examples:
The NumberInWords function Unit examples (WINDEV): The NumberInWords function
[ + ] Using the WLanguage NumberInWords function.
This function is used to convert a numeric into words, which is very useful to automatically fill a check for example.
Component : wd240std.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment