contents.gifprev1.gifnext1.gif

DB() - Declining balance

Calculate Declining Balance depreciation.

Returns

Double value if successful. If an error occurs, this function returns a zero.

Arguments

Type
Field
Description
double
dCost
Price of asset
double
dLife
Expected life of asset
integer
iPeriod
Number of periods in year that depreciation should be calculated
double
dFactor
Depreciation factor
16 bit DLL declarations

PowerBuilder Function declaration

function double DB(double dCost, double dLife, int iPeriod, double dFactor) library "IFL16.DLL"

Visual Basic Function declaration

Declare Function DB lib "IFL16" (ByVal dCost As Double, ByVal dLife As Double, ByVal iPeriod As Integer, ByVal dFactor As Double) As Double

C/C++ Synopsis

#include "function.h"

double DB(double dCost, double dLife, int iPeriod, double dFactor)

32 bit DLL declarations

PowerBuilder Function declaration

function double DB(double dCost, double dLife, int iPeriod, double dFactor) library "IFL32.DLL"

Visual Basic Function declaration

Declare Function DB lib "IFL32" (ByVal dCost As Double, ByVal dLife As Double, ByVal iPeriod As Integer, ByVal dFactor As Double) As Double

C/C++ Synopsis

#include "function.h"

double DB(double dCost, double dLife, short sPeriod, double dFactor)

Example:

dCost
=
50,000

dLife
=
6

iPeriod
=
4

dFactor
=
1.5
(150%)
Result: $ 4,166.67