Vdb(
Cost: Double;
Salvage: Double;
Life: Double;
StartPeriod: Double;
EndPeriod: Double;
Factor: Double;
NoSwitch: Boolean): Double;
Vdb(
Cost: double;
Salvage: double;
Life: double;
StartPeriod: double;
EndPeriod: double;
Factor: double;
NoSwitch: boolean): double;
Parameters | Description | Constraints |
Cost | Initial asset price. | Cannot be negative. |
Salvage | Value of an asset at the end of the depreciation period. | Must belong to the [0;Cost] interval. |
Life | Number of asset depreciation periods | Must be positive. |
StartPeriod | The first period, for which depreciation should be calculated. | Must be in the [1;Life] interval. |
EndPeriod | The last period, for which depreciation should be calculated. | Must be in the [StartPeriod;PeriodCount] interval. |
Factor | Interest rate of a decreasing remainder. | Must be positive. |
NoSwitch | Logical value, defining, if linear depreciation should be used in case depreciation exceeds the value, calculated using the decreasing remainder method. |
The Vdb method returns an asset's depreciation for any selected period, including partial periods, using the double remainder reduction method or another specified method.
If the Factor parameter is equal to 2, depreciation is calculated by the double declining method:
Where:
Ddb(Cost,Salvage,Life,Period,Factor) - value of asset depreciation for the set period.
To execute the example, add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Begin
r := Finance.Vdb(5000, 100, 12, 1, 3, 2, True);
Debug.WriteLine(r);
End Sub UserProc;
After executing the example the console window displays the asset depreciation value equal to 1273.15.
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.Vdb(5000, 100, 12, 1, 3, 2, True);
System.Diagnostics.Debug.WriteLine(r);
End Sub;
See also: