Converting a MATH_NUMERIC to a DOUBLE in 'C'

Christian Audet

Christian Audet

Moderator
Staff member
Converting a MATH_NUMERIC to a DOUBLE in \'C\'

Hi List,

I just realized today that there was no API's to convert from a MATH_NUMERIC to a DOUBLE in 'C'
I did it this way (see bellow) and I'm looking for a more elegant way.

here is my actual code.

-------------------------------------------------------------------------------------------
char szLineNumber[15], *dummy;
double nLineNumber;

FormatMathNumeric(szLineNumber,&lpDS->mnF1565LineNumber_LNID);
nLineNumber = strtod( szLineNumber, &dummy );
-------------------------------------------------------------------------------------------

Any better idea will be appreciated

Christian Audet
 
Re: Converting a MATH_NUMERIC to a DOUBLE in \'C\'

Both standard API's in XE (at least)

JDERTN(double) JDEWINAPI MathNumericToDouble

( const void * pMathNumeric );


JDERTN(MATHERRORCODE) JDEWINAPI DoubleToMathNumeric

( const double d,
void * pMathNumeric );
 
Re: Converting a MATH_NUMERIC to a DOUBLE in \'C\'

Thanks Trevor,

I did'nt have those in my API's List do you have a more complete list of API's ?

Christian Audet
 
Re: Converting a MATH_NUMERIC to a DOUBLE in \'C\'

It's kinda typical that the JDE Documentation is way outa date. Often the only way I discover these things is to trawl jdekprto.h. Of course if JDE don't document these API's they may withdraw them from future releases.
 
Re: Converting a MATH_NUMERIC to a DOUBLE in \'C\'

Thanks, I will take a look at the file for more prototype, I just didn't think at this idea before I was looking for other functions yesterday.

Christian Audet
 
Back
Top