🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Problem formatting BigDecimal

#15670
From: Keith Cheng
Date: Sat, 08 May 1999 00:00
15 lines
1017 bytes
Hi,
    I use a VariantFormatter, myFormatter,  with pattern "###" to format
a Variant of BigDecimal type.  This Variant has a length of 22 (e.g.
9999999999999999999999).
    The problem is:
    The non-formatted value of the Variant is
"9999999999999999999999999" (print by
bigDecimalVariant.getBigDecimal()).
    But the formatted value becomes "9999999999999999000000" (print by
myFormatter.format(bigDecimalVariant));

What am I doing wrong?
Thanks for your help!

Keith.....
Technical Details
Message-ID: <3733FD90.6003AB7D@excel.com.hk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,f683e8ef63e53e65,start
X-Google-Attributes: gidf74b3,public
From: Keith Cheng <Keith_Cheng@excel.com.hk>
Subject: Problem formatting BigDecimal
Date: 1999/05/08
Message-ID: <3733FD90.6003AB7D@excel.com.hk>
X-Deja-AN: 475469361
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language