Description |
The CurrencyFormat variable is in effect an enumerated type. The values it can hold determine placement of the currency string in the currency display functions, such as CurrToStr.
The allowed values are :
0 | = Before amount |
1 | = After amount |
2 | = Before amount with space |
3 | = After amount with space |
|
| Notes | The CurrencyString variable determines the actual currency symbol or string. In the UK, the default is ?
CurrencyFormat = LOCALE_ICURRENCY by default.
| | Related commands | |
Download this web site as a Windows program.
|
|
|
|
Example code : Illustrate the 4 currency formats | var
amount : Currency;
i : Byte;
begin
amount := 12;  // 12 pounds
 // Display the amount using all 4 currency formats
for i := 0 to 3 do
begin
CurrencyFormat := i;
ShowMessage('Format '+IntToStr(i)+' = '+CurrToStrF(amount, ffCurrency, 0));
end;
end;
| Show full unit code | Format 0 = ?12
Format 1 = 12?
Format 2 = ? 12
Format 3 = 12 ?
|
|
|