Today, I would like to present you an original way of iterating thru all the bits in an integer. The usual way of iterating the bits is to build a moving bit mask in a loop and selecting each bit in turn with that mask. This works perfectly and it is fast.
But today, I want to show you a better looking way of doing the same iteration. The final code is like this:
var OneBit : Boolean;begin
↧