campo-sirio/src/gfm/dpddb.c
mtollari 1b14ec9415 Spostamento cartella sorgenti
git-svn-id: svn://10.65.10.50/branches/R_10_00@23236 c028cbd2-c16b-5b4b-a496-9718f37d4682
2016-09-09 13:59:02 +00:00

52 lines
1.2 KiB
C
Executable File

/* 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 <stdio.h>
#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);
}