[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function            accum_dep - calculate accumulated depreciation

  Syntax              double accum_dep(double cost, double salvage, int
                                       life, int period, int dtype);

  Prototype in        finance.h

  Remarks             given the cost, salvage value and life of an item,
                      accum_dep will calculate the amount of accumulated
                      depreciation for the given period according to the
                      depreciation method specified by dtype. The cost and
                      salvage can be given in any unit (dollars, thousands
                      of dollars, etc.) but the life should be given in
                      depreciable periods (if you depreciate an item every
                      quarter, and the item has a life of 2 years, then
                      life should be 8).

                      The cost and salvage values should be in the same
                      units. The life and period should be given in the
                      same units.

                      Types of depreciation supported by the variable
                      dtype are:

                           1 -  Straight line depreciation
                           2 -  Sum of the years digits depreciation
                           3 -  Double declining balance depreciation

                      Any other value for dtype will produce unpredictable
                      results.

                      No error checking is performed.

                      This is a generic function to calculate the
                      accumulated depreciation given all necessary
                      information. Any unnecessary information is ignored
                      (i.e. double declining balance does not need a
                      salvage value.)

  Return value        returns the amount of depreciation for the given
                      period in the same units as the cost, as per the
                      depreciation method specified by dtype.

  Note                The macros ACC_DDB(c,l,p), ACC_SLD(c,s,l) and
                      ACC_SYD(c,s,l,p) are defined in finance.h for ease
                      of use.

  See also            depreciation(), double_decline_bal_dep(),
                      straight_line_dep(), sum_year_digits_dep()

  Example             see demonum.c

See Also: double_decline_bal_dep() straight_line_dep() sum_year_digits_dep()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson