This discussion is archived
1 Reply Latest reply: Apr 3, 2013 5:46 AM by 1000485 RSS

toText() format string will leave tailing decimal separator

1000485 Newbie
Currently Being Moderated
Hi,

I'm trying to export an oracle::occi::Number with toText(), while using format strings to round it to the 10th decimal place.
Currently, i'm using

myNumber.toText(myEnvironment,"FM999999999999999999999999D9999999999");

All goes well and the rounding gets done, but if my float happens to be, p.ex., 123 (i.e. no decimal part), toText will convet it to 123, (or 123. depending), thus leaving the decimal separator with no digits trailing it. I could fix it by using ...0D0... instead of ...9D9..., but i'd really like to know how to work around this.

C++ streams aside, this value gets written to a text file.

TIA

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points