IFinance.DollarFr

Syntax

DollarFr(DecimalValue: Double; Fraction: Integer): Double;

Parameters

Parameters Description Constraints
DecimalValue The number consisting of integer and fractional parts separated with decimal separator. Greater or equal to 0.
Fraction An integer, which has to be used as a denominator. Not equal to 0.

Description

The DollarFr method is used to convert a ruble price expressed as a decimal number to a ruble price expressed as a fraction.

Comments

DollarFr is calculated using the following formula:

DollarFr = FV + Value × (0.1k × Fraction),

where:

Example

To execute the example, add a link to the MathFin system assembly.

Sub UserProc;
Var
    r: Double;
Begin
    r := Finance.DollarFr(1.12516);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the transformation equal to 1.02. The example transforms the decimal number 1.125 into the number read as 1 integer and 2/16 and written as 1.02.

See also:

IFinance