campo-sirio/gfm/dpddbtbl.c

52 lines
1.2 KiB
C
Raw Normal View History

/* DEC **DepreciateDoubleDecliningTable(depr,remval,book,salv,life,partial);
*
* ARGUMENT
* DEC *depr, *remval, *book, *salv, *partial;
* int life;
*
* 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# i, the depreciation and remaining value are
* computed and stored in depr[i] and remval[i]. 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 <stdio.h>
#include "gm.h"
#include "gmsystem.h"
DEC **DepreciateDoubleDecliningTable(depr,remval,book,salv,life,partial)
DEC **depr, **remval, *book, *salv, *partial;
int life;
{
DEC dth, *th=&dth, **p;
_MacStart(GM_DPDDBTBL);
(void) ConvLongToDecimal(th, 200L);
p = DepreciateDecliningTable(depr,remval,book,salv,th,life,partial);
_MacRet(p);
}