Skip to main content
Version: 20 R7 BETA

Euro converter

Euro converter ( value ; fromCurrency ; toCurrency ) : Real

ParameterTypeDescription
valueRealValue to convert
fromCurrencyTextCode of the currency in which the value is expressed
toCurrencyTextCode of the currency into which the value must be converted
Function resultRealConverted value

Description

The Euro converter command converts any value from and to the different currencies belonging to “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:

ConstantTypeValue
Austrian SchillingTextATS
Belgian FrancTextBEF
Deutsche MarkTextDEM
EuroTextEUR
Finnish MarkkaTextFIM
French FrancTextFRF
Greek DrachmaTextGRD
Irish PoundTextIEP
Italian LiraTextITL
Luxembourg FrancTextLUF
Netherlands GuilderTextNLG
Portuguese EscudoTextPTE
Spanish PesetaTextESP

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:

CurrencyValue for 1 Euro
Austrian Schilling13.7603
Belgian Franc40.3399
Deutschemark1.95583
Finnish Markka5.94573
French Franc6.55957
Greek drachma340.750
Irish Pound0.787564
Italian Lire1936.27
Luxembourg Franc40.3399
Netherlands Guilder2.20371
Portuguese Escudo200.482
Spanish Peseta166.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)