Changing Data types again....
Hi
Having probs changing data from INT to Double. I keep getting the 'possible loss of precision' error, though I can do it the other way it seems.
Duration is the INT field -
Duration = (double) Duration - Credit
It wont compile
If anyone could give me some info id appreciate it
[353 byte] By [
Sacreda] at [2007-10-2 3:15:06]

Then you are trying to assign double to int so you will have a loss of precision like if the result is 12.875 your int variable will only hold 12 that what the compiler is trying to tell you . You need to explicitly cast to avoid this
Duration = (int) (Duration - Credit);
> But thats it I dont want to lose precision I want to
> cast the INT into a double if possible, so it would
> be double duration and double credit being calculated.Then you shouldn抰 assign the value back to an int variable, there isn抰 any way around it . You will have to rethink your design, why did you declare Duration as an int