• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using and manipulating float/Double values in J2Me

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,
I am a begineer in J2ME. Can any one tell me how to handle and manipilate float/double values in J2ME
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good question. I'm a beginner as well but here's what I know.

floats were left out on j2me. Including them will cause the code to not compile.
If you needed it for money values and it is very simple, you can use two integers, one for dollars and one for cents (or whatever currency is desired).

There are libraries out there that will provide float handling:
http://www.dclausen.net/projects/microfloat/
http://gridbug.ods.org/Real.html
http://henson.newmail.ru/j2me/FloatConv.htm
reply
    Bookmark Topic Watch Topic
  • New Topic