In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: John, The problem is that the SX doesn't allow a variable for bit position. You need to do something like this: temp = 1 << y IF a = 0 THEN temp = ~temp alarm(x) = alarm(x) AND temp ELSE alarm(x) = alarm(x) OR temp ENDIF Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=106033#m106053 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)