Currency
The Currency generator type supports the following constructors:
-
(Currency designator)
-
(Number amount)
-
(Number amount, Currency currency)
-
(Number dollar, Number cent)
-
(Number dollar, Number cent, Currency currency)
-
(Number amount, Boolean colloquial)
-
(Number amount, Boolean colloquial, Currency currency)
-
(Number dollar, Number cent, Boolean colloquial, Currency currency)
The six parameters are:
-
Designator—The designator of a currency to play back. (For example, “USD” is played back as “U.S. Dollar”.)
-
Amount—The currency amount to be played back in the system configured default currency or in the specified currency.
-
Dollar—Number object representing the amount of currency unit to be played. Only the integer part of the number is played. The fractional part, if any, is ignored.
-
Cent—Number object representing the currency subdivision to be played. Only the integer part of the number is played. The fractional part, if any, is ignored.
Note | If the number specified exceeds the maximum value allowed for the subdivisions, the excess is added properly to the number of currency unit. For example, specifying “5 dollars and 233” cents results in “7 dollars and 33 cents”. |
-
Colloquial—An optional Boolean flag, which specifies whether to use colloquial currencies’ representations (for example, “Dollars” instead of “US Dollars”). If omitted, the currency amount is played in colloquial format.
Note | This field does not apply for currency first denomination. For example 1 dollar is termed as 1 US Dollar or un dolar americano etc based on the language. |
-
Currency—The currency in which the amount should be played back. If not specified, the system default configured currency is played back.