humanReadablePrintString

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

humanReadablePrintString

HilaireFernandes
Hi,

This code leads to an error:

"On place 10'000 € à un taux de 4 % par année.
Au bout de combien d'années aura-t-on 20'000 € ?"
| annee |
annee := [ :capital |
    ((capital / 10000) log / (1 + 0.04) log) years
humanReadablePrintString  ].
annee value: 20000 .

#printWithCommasOn: is understood only by integer.

In my opinion printHumanReadableOn: should be edited as:

../..

        (wholeNanoseconds 'nanosecond')) do: [ :each |
        count := (self perform: each first) truncated.
        count > 0 

../..

Opinion?

Hilaire


--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: humanReadablePrintString

Sven Van Caekenberghe-2
Yes, probably.

> On 4 Sep 2019, at 15:32, Hilaire <[hidden email]> wrote:
>
> Hi,
>
> This code leads to an error:
>
> "On place 10'000 € à un taux de 4 % par année.
> Au bout de combien d'années aura-t-on 20'000 € ?"
> | annee |
> annee := [ :capital |
>     ((capital / 10000) log / (1 + 0.04) log) years
> humanReadablePrintString  ].
> annee value: 20000 .
>
> #printWithCommasOn: is understood only by integer.
>
> In my opinion printHumanReadableOn: should be edited as:
>
> ../..
>
>         (wholeNanoseconds 'nanosecond')) do: [ :each |
>         count := (self perform: each first) truncated.
>         count > 0
>
> ../..
>
> Opinion?
>
> Hilaire
>
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: humanReadablePrintString

HilaireFernandes
https://github.com/pharo-project/pharo/issues/4497

Le 04/09/2019 à 15:57, Sven Van Caekenberghe a écrit :
> Yes, probably.

--
Dr. Geo
http://drgeo.eu