Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunti i sorgenti per Greenleaf Math Library (gfm.dll) git-svn-id: svn://10.65.10.50/trunk@10079 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			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);
 | |
| }
 |