In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: Okay so SX/B doesn't have compound IF conditions. Emulating "AND" is not hard at all. Simply use: [code] ' Emulate IF (a=1) AND (b=2) THEN IF a = 1 THEN IF b = 2 THEN ' CODE HERE RUNS IF a=1 AND b=2 ENDIF ENDIF But "OR" is a little bit harder, but here is how to do it without needing any additional variables: [code] ' Emulate IF (a=1) OR (b=2) THEN DO IF a <> 1 THEN ' Use Opposite Condition Here IF b <> 2 THEN EXIT 'Use Opposite Condition Here ENDIF ' CODE HERE RUNS IF a=1 OR b=2 LOOP UNTIL a = a ' Use A Condition that is always true Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=135462 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)