counting matching bits / bitXnor

Cees de Groot cdegroot at gmail.com
Tue Dec 18 10:10:46 UTC 2007


On Dec 17, 2007 6:25 PM, Paolo Bonzini <bonzini at gnu.org> wrote:
> Your data type is a BitArray, but if you encode it as an Integer, that's
> not enough.  You need another instance variable to store the width or
> alternatively a mask (i.e. (1 bitShift: width) - 1).  Then, you have
> something like this:
>
[...]

thanks. You're right, of course. I'm trying to stuff square pegs in
round holes here. That's probably what you get when your daytime job
largely plays in PHP-land...

Tim - thanks for the tip on Bitblt, I would have never thought to look
there (graphics stuff scares me ;-))

-- 
"Human beings make life so interesting. Do you know, that in a
universe so full of wonders, they have managed to invent boredom. " -
Death, in "The Hogfather"



More information about the Squeak-dev mailing list