Re: [twsocket] Original way of iterating thru all the bits in an integer

2013-01-06 Thread Arno Garrels
François Piette wrote: > The final code looks like this: > > > > var > OneBit : Boolean; > begin > for OneBit in TBitIterator.Create(1234) do > Write(Ord(OneBit)); > end; > > > > You can read the article at > http://francois-piette.blogspot.be/2013/01/original-method-to-iterate-bits-w

Re: [twsocket] Original way of iterating thru all the bits in an integer

2013-01-05 Thread François Piette
> I was just wondering, what would be a practical application of this routine? As you probably don't know, I'm doing a lot of process control with Delphi. And I frequently have to process bit collections. > wouldn't it be more efficient to just shift the value to the left directly without the

Re: [twsocket] Original way of iterating thru all the bits in an integer

2013-01-05 Thread DZ-Jay
Hi Francois, I was just wondering, what would be a practical application of this routine? Also, being familiar with Assembly, I have to ask: wouldn't it be more efficient to just shift the value to the left directly without the abstraction of the enumerator? dZ. On Jan 05, 2013, at