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 15:21, François Piette wrote: > Hi ! > > > > I wrote an article about an original way of iterating thru all the bits of > an integer. > > This is the kind of fancy code one could write using recent version of > Delphi. I would like to apply this kind of code in ICS, but if I do, it > won’t work anymore with the old D7. > > > > 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 > ithin.html > > > > > > -- > > francois.pie...@overbyte.be > > Embarcadero MVP > > http://www.overbyte.be > > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be