Anything wrong with using floats or doubles? (direct mathematic operations
are not supported with the old float manger routines)

float fPrice, fTotal,fQuantity;

fTotal = fQuantity * fPrice;

However, if you are working with monetary units you will be better off using
integers.  You will notice rounding errors that will keep your calculations
from being accurate to the penny, schilling, euro, whatever.

----- Original Message -----
From: "Rafail Mladenov" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 7:34 AM
Subject: FloatManager


> Hello all,
>  I'm trying to do this:
>
> FlpCompDouble   fPrice, fTotal,fQuantity;
> ....
> fTotal.fd = fQuantity.fd * fPrice.fd ;
> ...
>
> And I receive:
> Error  : illegal operand
>
> I'm using CodeWarrior 8
> Can someone tell me where did I go wrong ?
> Please help!
>
> thanks in advance for any help.
>
> Raffo
>
>
>
> --
> 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/

Reply via email to