<html><DIV>
<P>Hi Paul,</P>
<P>I'll have a look at the code you attached when I can. In the meantime,
though, it looks as though you potentially have 36 on/off flags (A-Z,,0-9)
defined. This could all be handled as in Hal's tutorial, except that you would
need 3 16-bit numbers.</P>
<P>Using the bit operations has several advantages over maintaining an options list,
and undoubtedly some disadvantages as well. I guess the main disadvantage is in
comprehensibility/clarity. But with bitwise operations, you can
toggle/turn-on/turn-off/read individual flags VERY efficiently. It also makes
the options easy to store and pass. You just need some way of knowing that flag
X is, for example, the 3rd least significant bit (ie the 4s bit) of variable Option2,
etc.</P>
<P>I imagine that the efficiencies involved in using bitwise operations become even
greater as the number of flags increases. Really, in one way of looking at
things, a 16-bit number is just a hyper-efficient array of flags. It's very
enticing, if you fancy that kind of thing.</P>
<P>See ya,</P>
<P>Lee.</P>
<P> </P></DIV>>From: Paul Smith <[EMAIL PROTECTED]>
<DIV></DIV>>>Or is it that your options are not simple on/off flags, but require
<DIV></DIV>>>3 or
<DIV></DIV>>>more states instead of just binary?
<DIV></DIV>>
<DIV></DIV>>They're basically on/off. I had been using bit variables for them,
<DIV></DIV>>but
<DIV></DIV>>managing bits was getting out of hand. In addition, multiple bits
<DIV></DIV>>were
<DIV></DIV>>forcing me to put more data in a query, and pass it to a page, than
<DIV></DIV>>I thot
<DIV></DIV>>I needed (8 bits inside SQL Server is one byte, but not when CF gets
<DIV></DIV>>a hold
<DIV></DIV>>of 8 0's or 1's outside SQL Server)
<DIV></DIV>>
<DIV></DIV>>I went with a list: 1,2,...,9,A,B,...,Z, etc, and I've revised my
<DIV></DIV>>code
<DIV></DIV>>today. It's MUCH cleaner and probably faster.
<DIV></DIV>>
<DIV></DIV>>Some of the list data looks like this:
<DIV></DIV>>
<DIV></DIV>>Record FAlist
<DIV></DIV>>120045 S
<DIV></DIV>>1235 S,A,1
<DIV></DIV>>45210 V,5
<DIV></DIV>>96734 V,1,S
<DIV></DIV>>
<DIV>...</DIV><br clear=all><hr>Get Your Private, Free E-mail from MSN Hotmail at <a
href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p></html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists