I'm not trying to input a float into StrIToA. I'm trying to input the
result of the comparison which *is* and integer. I don't understand
what's going on.
-Nathan
Steve Sabram wrote:
>
> StrIToA is meant to have an integer as input and not floating point. Unfortunately,
>there is no PalmOS call for converting a double
> to a string; event the PrintF fields of %f and %g are not supported. Search the
>archives of this list and you will find several
> ways to do this from other postings..
>
> Steve
>
> Nathan Peterson wrote:
>
> > I've been having problems working with floating point variables. Here's
> > an example:
> >
> > double test1 = 0.2;
> > int test2 = 5;
> >
> > StrIToA(debugstring1,0.2>5);
> > StrIToA(debugstring2,test1>test2);
> >
> > When I print out debugstring1 and debugstring2 I get the following:
> >
> > debugstring1=0 // 0.2>5 is correctly evaluated at compile-time to 0
> > debugstring2=1 // test1>test2 is incorrectly evaluated at run-time :(
> >
> > That seems kind of messed up. Does anyone know what's going on? I'm
> > using prc-tools with sdk3.5 on cygwin running on windows98. I'm using
> > PalmOS v3.3
> >
> > Thanks,
> > -Nathan
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/