Hi,

I have a strange behaviour in a program compiled with PRC-Tools.
Here is the code which works :

static void Go()
{
double d,e;
int i;
d=3.1416;
i=(int)d;
e=(double)i;
...
}

after this, the values of the variables are : d=3.1416, i=3, e=3

Then the code which puzzles me :

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.

Any idea ?

All the best

Pierre Brial
Reunion Island

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to