IFinance.Sln

Fore Syntax

Sln(Cost: Double; Salvage: Double; Life: Integer): Double;

Fore.NET Syntax

Sln(Cost: double; Salvage: double; Life: integer): double;

Parameters

Parameters Description Constraints
Cost Cost for acquiring an asset. Cannot be negative.
Salvage Value of an asset at the end of its useful life. Must belong to the [0;Cost] interval.
Life The number of periods of useful life. Must be positive.

Description

The Sln method returns the depreciation of an asset for one period, calculated using a linear method.

Comments

Sln is calculated using the following formula:

Fore Example

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

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

After executing the example the console window displays the asset depreciation value equal to 583.3375.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.MathFin;

Public Shared Sub Main(Params: StartParams);
Var
    r: double;
    Finance: FinanceClass = New FinanceClass();
Begin
    r := Finance.Sln(15000.1100024);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IFinance