[squeak-dev] ByteArray>>at:put:

Igor Stasenko siguctua at gmail.com
Wed Jul 19 21:35:28 UTC 2017


On 20 July 2017 at 00:16, Eliot Miranda <eliot.miranda at gmail.com> wrote:

> Hi Bert,
>
> On Wed, Jul 19, 2017 at 6:10 AM, Bert Freudenberg <bert at freudenbergs.de>
> wrote:
>
>> #[195 164] collect: [:c | c hex]
>> => #[16 16]
>>
>
> +1
>
> at: index put: value
> <primitive: 61> "try primitiveAtPut, convert value to integer if that
> fails and try again"
> ^ self byteAt: index put: value asInteger
>
> is wrong.
>
>
>>
>> I think this should have raised an error. Tim?
>>
>
> Why don't we simply remove the method? Tim may be using this in his
> benchmarks but I'm sure there's a better way.
>
> But there's possibly another error here too.  Why is '16rC3' asInteger 16
> instead of 195?
>
> indeed. And that has nothing to do with bytearray method.


>
> _,,,^..^,,,_
> best, Eliot
>
>
>
>


-- 
Best regards,
Igor Stasenko.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170720/c9a81c3f/attachment.html>


More information about the Squeak-dev mailing list