Re: Removing trailing decimals

Michael Kay wrote:


> When we made this decision, we did discuss whether there was a need to
> enhance format-number() to provide both options, and decided that this would
> be feature-creep. There are higher-priority enhancements, such as supporting
> exponential notation, but we're trying quite hard at the moment to enforce a
> policy of "no new features". In the use case you mention, it would be
> entirely acceptable to use a picture of "0.0#" and produce the output "3.0".

In terms of the compiled C code, it would be. However, in terms of the 
source code I'm not quite so sure. Where I've seen 3. used in practice 
is among scientists who have a very clear picture of significant digits, 
and typically assume that numbers are +/-1 in the last decimal place 
unless specified otherwise. 3. does not mean the same thing to them as 
3.0 or 3.00, even if the C compiler treats them the same. That said, 
this is very obscure, and I agree that backwards compatibility is more 
important here.

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

Received on Monday, 14 February 2005 12:16:44 UTC