🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #20064

Re: Formatting float output

#20064
From: Joe Nuxoll
Date: Mon, 27 Oct 1997 00:00
17 lines
1113 bytes
Angus M. Fraser wrote:
> I seems, from the Help files that the Standard version of JBuilder
> doesn't have the DataSet package.
> Any other suggestions on how to get a float displayed with a fixed
> number of decimal places?

Yes, true...  I just assume everyone has the PRO version (silly me). 
You'll have to 'roll-your-own' then.  Create a simple function that
takes a float and returns a String.  Analyze the float object and
construct the String character by character...

public String displayFloat(float f, int decimals) {
  ... should be pretty simple ...
}

 - Joe Nuxoll
Technical Details
Message-ID: <34554581.F392BF51@corp.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3451136b.2656780@forums.borland.com> <34511626.948766A3@corp.borland.com> <3454fc25.6194677@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,b10a81d316bd276b
X-Google-Attributes: gidf74b3,public
From: Joe Nuxoll <jnuxoll@corp.borland.com>
Subject: Re: Formatting float output
Date: 1997/10/27
Message-ID: <34554581.F392BF51@corp.borland.com>
X-Deja-AN: 285436264
References: <3451136b.2656780@forums.borland.com> <34511626.948766A3@corp.borland.com> <3454fc25.6194677@forums.borland.com>
Organization: Borland International, Inc.
Newsgroups: borland.public.jbuilder.java.language