Hello,
I have downloaded the last version of prc-tools and now the conversion
double-integer works perfectly.
Thank you again to Ben and John for pointing me this out.
When I think I spent my whole week-end re-reading my C and Palm Api
manual to find a solution...
All the best
Pierre Brial
Pierre Brial a �crit:
>
> Hello Ben and John,
>
> Thank you to have answered so fast.
> You are certainly right.
> I use prc-tools version 2.0, and the bug described look like mine.
> I will download the new version and let you know if it works.
>
> All the best
>
> Ben Combee a �crit:
> >
> > At 11:27 AM 6/2/2004, you wrote:
> > >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 ?
> >
> > Is 'e' used in the code after the assignment? Could this be a situation
> > where the optimized in GCC sees that e is unused, so it eliminates the
> > assignment? At what optimization level are you building your code, and
> > what version of prc-tools are you using?
> >
> > -- Ben Combee, DTS technical lead, PalmSource, Inc.
> > Read "Combee on Palm OS" at http://palmos.combee.net/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
> http://www.palmos.com/dev/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/