/* DEC *DepreciateDoubleDeclining(depr,remval,book,salv, life,partial,time); * * ARGUMENT * DEC *depr, *remval, *book, *salv, *partial; * int life, time; * * DESCRIPTION * Calculate a specific year's depreciation and remaining depreciable * value according to double declining balance depreciation. * The item has book value * book, salvage value salv, and lifetime life (which may include a partial * period). At year# time, the depreciation and remaining value are * computed and stored in depr and remval. The first year is always * the partial year. * * SIDE EFFECTS * depr and remval are changed. * * RETURNS * depr if successful, otherwise GM_NULL. * * POSSIBLE ERRORS * GM_NULLPOINTER * GM_ARGVAL * * AUTHOR * Jared Levy * Copyright (C) 1988-1990 Greenleaf Software Inc. All rights reserved. * * MODIFICATIONS * * */ #include #include "gm.h" #include "gmsystem.h" DEC *DepreciateDoubleDeclining(depr,remval,book,salv,life,partial,time) DEC *depr, *remval, *book, *salv, *partial; int life, time; { DEC dth, *th=&dth, *p; _MacStart(GM_DPDDB); (void) ConvLongToDecimal(th, 200L); p = DepreciateDeclining(depr,remval,book,salv,th,life,partial,time); _MacRet(p); }