[Pharo-project] digitAt: issue

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon May 2 11:33:18 CEST 2011


Hello,

digitAt: 1 returns the least significant byte, thus it is expectedto be 0.
The most significant would be

| n |
(n := 2 raisedTo: 100000) digitAt: n digitLength

Nicolas

2011/5/2 Bernat Romagosa <tibabenfortlapalanca at gmail.com>:
> Hi, try to run the following:
>
> (2 raisedTo: 100000) digitAt: 1
>
> The expected result (if I understood what digitAt: should return) is 9, but
> the message returns 0 instead. In fact, it returns 0 for any index.
> Is this a bug or am I missunderstanding how digitAt: should work?
> Cheers,
> Bernat Romagosa.
> p.s. My config is Pharo 1.2 with a 'Croquet Closure Cog VM [CoInterpreter
> VMMaker-oscog.51]' on Debian Lenny.



More information about the Pharo-project mailing list