×

Discussion Board

Results 1 to 2 of 2

Thread: Format numbers

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    5

    Format numbers

    Hello to all,

    this is maybe a really stupid question, I have searched the whole forum but found no case logged.

    I would like to format numbers of type double

    for instance the result is :

    44.9385678

    and i would like

    44.94

    I looked at NumberFormat but it does not seem to exist.

    Thank you for your precious help,

    Jerome

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Austin, TX, USA
    Posts
    52

    Re: Format numbers

    Jerome,

    It's not a dumb question at all; in order to save space, this functionality is not present in CLDC 1.1. We wrote our own kludgy function which basically adds .005, multiplies by 100 and then casts to a long, converts to a string, and then adds zeroes if needed.

    hope that helps
    regan_coleman AT xenient.com

Similar Threads

  1. faulty phone number format after synchronizing my Nokia 6210 with OutlookXP
    By ricvilla in forum PC Suite API and PC Connectivity SDK
    Replies: 3
    Last Post: 2006-12-28, 16:20
  2. Support for international phone numbers
    By padlon in forum General Development Questions
    Replies: 3
    Last Post: 2005-05-04, 10:53
  3. ????????Convert Date format
    By mehulgarnara in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-04-15, 07:34
  4. Where are my numbers stored on pc?
    By jamesmills in forum General Development Questions
    Replies: 1
    Last Post: 2004-02-09, 02:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×