Language Dependent Formatting of Amount and Currency

To format a currency amount with decimals according to the currency use WRITE and the CURRENCY option.

Currency keys an d numbers of decimals are defined in table TCURX Decimal Places in Currencies.

Example 1: Formatting an amount in Kuwatian Dinars:

Dmbtr = 123456.
Write dmbtr currency 'KUD'


Write dmbtr currency 'USD'


Note that the formatting does not depend on the number of decimals in the number in the program.

Dmbtr = '12.3456'.

Write dmbtr currency 'USD'


To format the decimal and thousand sepearators according to the settings for a specific country, use the statement SET COUNTRY <country key>

Settings for countries are defined in table T005 Countries.

The country key used in the statement is field LAND1


set country 'US'


Converted from CHM to HTML with chm2web Standard 2.7 (unicode)