On Wed, Jun 02, 2004 at 08:27:10PM +0400, Pierre Brial wrote:
> double ReturnDouble()
> { return 3.1416; }
>
> static void Go()
> {
> double d,e;
> int i;
> d=ReturnDouble();
> i=(int)d;
> e=(double)i;
> ...
> }
>
> after this, the values of the variables are : d=3.1416, i=3, e=0 !!!
> I don't understand why e cannot take the value of i.
You are using an old version of prc-tools that contains a bug related
to run-time int<->double conversions. The bug was fixed four years ago.
The solution is to update to a more recent version of prc-tools.
For details, see
http://www.escribe.com/computing/pcpqa/m44661.html
http://prc-tools.sourceforge.net/releases.html
John
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/