ba237a9d91
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
54 lines
841 B
C
Executable File
54 lines
841 B
C
Executable File
/* DEC *MakeDecimalFromUnsLong( x, l, n)
|
|
*
|
|
* ARGUMENT
|
|
* DEC *x;
|
|
* unsigned long l;
|
|
* int n;
|
|
*
|
|
* DESCRIPTION
|
|
* Converts unsigned long 'l' to a DEC with implied decimal 'n'.
|
|
*
|
|
* SIDE EFFECTS
|
|
* None.
|
|
*
|
|
* RETURNS
|
|
* The DEC if the conversion is successful, and GM_NULL otherwise.
|
|
*
|
|
* POSSIBLE ERROR CODES
|
|
*
|
|
* GM_INVALIDID
|
|
*
|
|
* AUTHOR
|
|
* Jared Levy Feb. 9, 1987
|
|
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
|
|
*
|
|
* MODIFICATIONS
|
|
*
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "gm.h"
|
|
#include "gmsystem.h"
|
|
|
|
DEC *MakeDecimalFromUnsLong( x, l, n)
|
|
DEC *x;
|
|
unsigned long l;
|
|
int n;
|
|
|
|
{
|
|
_MacStart(GM_MAKULD);
|
|
_MacOutVarD(x);
|
|
if((n>GM_MAXID)||(n<GM_MINID)) {
|
|
_MacErr(GM_INVALIDID);
|
|
_MacRet(GM_NULL);
|
|
}
|
|
|
|
x->ls.lattr = 0;
|
|
x->ls.lid = n;
|
|
x->ls.lsl[0] = l;
|
|
x->ls.lsl[1] = 0L;
|
|
x->dc.msd = 0;
|
|
|
|
_MacRet(x);
|
|
}
|