Gene Buckle
2008-06-17 03:57:53 UTC
I'm trying to convert a double to BCD, and all I'm getting for my
trouble are exceptions.
example:
TBcd bcdData;
double doubleData;
(doubleData in this case is 4.24399209022528E-313)
bcdData = DoubleToBcd(doubleData) results in an exception complaining that the
stated value isn't a valid BCD value. The documentation for the this routine
is completely inadequate and searches on the net haven't been helpful.
What I don't get is if it can reasonably fit in a double, why the hell can't
it be converted? Is there a way around this? I certainly can't change the
number because it's coming from an external source.
Any help will be hugely appriciated.
tnx.
g.
trouble are exceptions.
example:
TBcd bcdData;
double doubleData;
(doubleData in this case is 4.24399209022528E-313)
bcdData = DoubleToBcd(doubleData) results in an exception complaining that the
stated value isn't a valid BCD value. The documentation for the this routine
is completely inadequate and searches on the net haven't been helpful.
What I don't get is if it can reasonably fit in a double, why the hell can't
it be converted? Is there a way around this? I certainly can't change the
number because it's coming from an external source.
Any help will be hugely appriciated.
tnx.
g.
--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.