In SX Microcontrollers, SX/B Compiler and SX-Key Tool, John Kauffman wrote: I completely agree with you, PJMonty; readability is king, especially for teaching, until some other factor encroaches. Bean is right on the money as well - I've made notes to change all of my code in the curret project to use self-explanatory constants. Elegent was probably the wrong word. Spending time visiting Microsoft is exciting, but it does leave one viewing the world from the perspective of squeezing speed out of billions of lines of code, at the cost of simplicity. In this particular case it seemed like there would be a simpler way to get the result. I wanted to be sure I didn't miss. But it sounds like the best bet is the nested IF or the "combine before IF" approaches. And Kevin, thanks for the review of logic states. I hadn't seen how NOR would solve the problem until you explained it. Thanks guys. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=157351#m157422 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)