> On 25 Oct 2016, at 11:05, Henrik Johansen <[email protected]> 
> wrote:
> 
> +1.
> 
> Unless you're dealing with fixed precision* entities, it's usually better to 
> specify digits to display in printing methods themselves 
> (#printShowingDecimalPlaces: & friends in base image).
> As per previous discussions around this that arise every second year or so, 
> rounding the number itself (as long as we're dealing with floats) will never 
> work as you want reliably.
> 
> Cheers,
> Henry
> 
> * And in that case, you'd use ScaledDecimals 

YES !!

So true.

>> On 23 Oct 2016, at 7:08 , [email protected] wrote:
>> 
>> I use the Printf package for that.
>> 
>> v := 65.456.
>> 'With 2 decimal digits: %5.2f, or 3 like this: %6.3f' 
>>      printf: {v. v}.
>> 
>> With 2 decimal digits: 65.45, or 3 like this: 65.456
>> 
>> It is in http://www.smalltalkhub.com/#!/~philippeback/HOExtras
>> 
>> Printf
>> 
>> I am just used to C printf and well, I like the way it works.
>> 
>> Phil


Reply via email to