posted 12 years ago
i know that the jvm for the cldc does not support floating point variables!! but is there any way by which i can use floating point numbers?? (for. eg i am creating an application that calculates the sales of a medical representative and i need floating point support)!! please suggest something!!
Regards
Simon

Regards
Simon


posted 12 years ago
There are three ways.
1. Basically don't use decimals in your calculation, then using a String add the decimal point in the correct place. This works mostly with currency, but might work for you.
2. MathFP is a third part jar file that allows MIDP 1.0 to use Floats.
3. Use MIDP 2.0/CLDC 1.1 which now includes Floating points.
Mark
1. Basically don't use decimals in your calculation, then using a String add the decimal point in the correct place. This works mostly with currency, but might work for you.
2. MathFP is a third part jar file that allows MIDP 1.0 to use Floats.
3. Use MIDP 2.0/CLDC 1.1 which now includes Floating points.
Mark

Don't get me started about those stupid light bulbs. |