From: "David A. Black" Date: 2005-11-01T23:49:42+09:00 Subject: Re: Newbie: How to format a number to always show two decimals? Hi -- On Tue, 1 Nov 2005, Gavin Kistner wrote: > On Oct 31, 2005, at 5:41 PM, David A. Black wrote: >> Aside to Phrogz: is that left over from a game of code golf?? :-) > > LOL. No, before I grokked sprintf, I needed the round_to functionality. > That's a port of the Number.toFixed algorithm from section 15.7.4.5 of the > ECMAScript (ECMA-262) specs: Interesting pedigree. It was the semi-colons and the vacuum-packed syntax that made me think it might be a multi-line split-out of a former golf entry :-) David -- David A. Black dblack@wobblini.net