4D v14.3Euro converter |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
Euro converter
|
Euro converter ( value ; fromCurrency ; toCurrency ) -> Function result | ||||||||
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 | |||||
The Euro converter command converts any value from and to the different currencies belonging to “Euroland” and the Euro currency itself.
You can convert:
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 |
Deutsche Mark | String | DEM |
Euro | String | EUR |
Finnish Markka | String | FIM |
French Franc | String | FRF |
Greek Drachma | String | GRD |
Irish Pound | String | IEP |
Italian Lira | 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 |
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)
Product: 4D
Theme: Math
Number:
676
Modified: 4D v6.7
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)