bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DDB# Function Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
DDB# returns the depreciation of an asset for a specific period using the
double-declining-balance method.
DDB# (cost#, salvage#, life#, period#, status%)
■ The arguments life# and period# must use the same units. If
life# is given in months, period# also must be given in months.
■ The argument status% can be any variable that returns information
about the success or failure of the calculation. The value of status%
will be 0 if the calculation was successful, and 1 if it was not.
Usage Notes
■ The double-declining balance-method computes depreciation at an
accelerated rate. Depreciation is highest in the first period and
decreases in successive periods.
■ The formula for DDB# is described in the BASIC Language Reference
manual.
Important
■ To use DDB# in the QBX environment, use the FINANCER.QLB Quick
library. To use DDB# outside the QBX environment, link your program
with the appropriate FINANCxx.LIB file. Depending on the compiler
options you chose when you installed BASIC, one or more of the
following files will be available:
Filename Compiler options
════════════ ═════════════════════════════════════════════
FINANCER.LIB 80x87 or emulator math; DOS or OS/2 real mode
FINANCAR.LIB Alternate math; DOS or OS/2 real mode
FINANCEP.LIB 80x87 or emulator math; OS/2 protected mode
FINANCAP.LIB Alternate math; OS/2 protected mode
■ The FINANC.BI header file contains the necessary function
declarations for DDB#.
■ For more information on using libraries, see "Creating and Using
Quick Libraries" and "Using LINK and LIB" in the BASIC Programmer's
Guide.