In SX Microcontrollers, SX/B Compiler and SX-Key Tool, kvwood wrote: You could use the AND (&) operator on the switch values. See the SX/B help file for an example. Although you are looking for the least amount of code, you might want to consider putting your LED code in a seperate subroutine. This increases size, but adds clarity and reusability. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=157351#m157366 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)