version 6.7 (Modified)
Euro converter (value; fromCurrency; toCurrency) Real
Parameter | Type | Description | |
value | Real | Value to convert | |
fromCurrency | String | Code of the currency in which the value is expressed | |
toCurrency | String | Code of the currency into which the value must be | |
converted | |||
Function result | Real | Converted value |
Description
The Euro converter command allows you to convert any value from and to the different currencies belonging to the "Euroland" and the Euro currency itself.
You can convert:
a national currency into Euros,
Euros into a national currency,
a national currency into another national currency. In this case, the conversion is calculated by the intermediary of the Euro, as specified in the European reglementation. For example, to convert Belgian francs to Deutschemarks, 4D will perform the following calculations: Belgian francs -> Euros -> Deutchemarks.
Pass the value to convert in the first parameter.
The second parameter indicates the Currency code in which value is expressed.
The third parameter indicates the Currency code into which value must be converted.
To specify a Currency code, 4D proposes the following predefined constants, placed in the "Euro Currencies" theme:
Constant | Type | Value |
Austrian Schilling | String | ATS |
Belgian Franc | String | BEF |
Deutschemark | String | DEM |
Euro | String | EUR |
Finnish Markka | String | FIM |
French Franc | String | FRF |
Greek drachma | String | GRD |
Irish Pound | String | IEP |
Italian Lire | String | ITL |
Luxembourg Franc | String | LUF |
Netherlands Guilder | String | NLG |
Portuguese Escudo | String | PTE |
Spanish Peseta | String | ESP |
If necessary, 4D performs rounding automatically on conversion results and keeps 2 decimals except for conversions to Italian Lires, Belgian Francs, Luxembourg Francs and Spanish Pesetas, for which 4D keeps 0 decimal (the result is an integer number).
The conversion rates between the Euro and the currencies of the 11 participating Member States are fixed:
Currency | Value for 1 Euro |
Austrian Schilling | 13.7603 |
Belgian Franc | 40.3399 |
Deutschemark | 1.95583 |
Finnish Markka | 5.94573 |
French Franc | 6.55957 |
Greek drachma | 340.750 |
Irish Pound | 0.787564 |
Italian Lire | 1936.27 |
Luxembourg Franc | 40.3399 |
Netherlands Guilder | 2.20371 |
Portuguese Escudo | 200.482 |
Spanish Peseta | 166.386 |
Example
Here are some examples of conversions that can be done with this command:
$value:=10000 `Value expressed in French Francs `Convert the value into Euros $InEuros:=Euro converter($value;French Franc; Euro) `Convert the value into Italian Lire $InLires:=Euro converter ($value;French Franc; Italian Lire)