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
		
			
				
	
	
		
			49 lines
		
	
	
		
			759 B
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			759 B
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
/* DEC	*DecimalModuloLong(pDst, pSrc1,	pSrc2);
 | 
						|
 *
 | 
						|
 * ARGUMENT
 | 
						|
 *	DEC	*pDst, *pSrc1;
 | 
						|
 *	long	pSrc2;
 | 
						|
 *
 | 
						|
 * DESCRIPTION
 | 
						|
 *	Sets pDst = pSrc1 mod pSrc2.
 | 
						|
 *
 | 
						|
 * SIDE	EFFECTS
 | 
						|
 *	None.
 | 
						|
 *
 | 
						|
 * RETURNS
 | 
						|
 *	pDst if	successful, otherwise GM_NULL.
 | 
						|
 *
 | 
						|
 * POSSIBLE ERRORS
 | 
						|
 *	GM_NULLPOINTER
 | 
						|
 *	GM_DIV0		(if pSrc2 == 0)
 | 
						|
 *
 | 
						|
 * ALGORITHM
 | 
						|
 *	a mod b	= a - int(a / b) * b
 | 
						|
 *
 | 
						|
 * AUTHOR
 | 
						|
 *  Jared Levy
 | 
						|
 *   Copyright (C) 1987-1990 Greenleaf Software	Inc.  All rights reserved.
 | 
						|
 *
 | 
						|
 * MODIFICATIONS
 | 
						|
 *
 | 
						|
 *
 | 
						|
 */
 | 
						|
 | 
						|
#include <stdio.h>
 | 
						|
#include "gm.h"
 | 
						|
#include "gmsystem.h"
 | 
						|
 | 
						|
DEC	*DecimalModuloLong(pDst, pSrc1,	pSrc2)
 | 
						|
DEC	*pDst, *pSrc1;
 | 
						|
long	pSrc2;
 | 
						|
{
 | 
						|
	DEC	dt2, *t2=&dt2, *pd;
 | 
						|
 | 
						|
	_MacStart(GM_DMODL);
 | 
						|
 | 
						|
	(void) ConvLongToDecimal(t2, pSrc2);
 | 
						|
 | 
						|
	pd = ModuloDecimal(pDst, pSrc1,	t2);
 | 
						|
	_MacRet(pd);
 | 
						|
}
 |