Sln(Cost: Double; Salvage: Double; Life: Integer): Double;
Sln(Cost: double; Salvage: double; Life: integer): double;
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. |
The Sln method returns the depreciation of an asset for one period, calculated using a linear method.
Sln is calculated using the following formula:
To execute the example, add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Begin
r := Finance.Sln(15000.1, 1000, 24);
Debug.WriteLine(r);
End Sub UserProc;
After executing the example the console window displays the asset depreciation value equal to 583.3375.
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.1, 1000, 24);
System.Diagnostics.Debug.WriteLine(r);
End Sub;
See also: