In SX Microcontrollers, SX/B Compiler and SX-Key Tool, TheBandit wrote: Well that worked okay, but then I realized I need a > or < to take care of situations where the angle skips over the limit (say I go from 2600 to 2610). Now it doesn't work again. Here's what I'm trying [code]upperlimit CON 2600 lowerlimit CON -999 angle VAR Word 'angle [code] IF absangle>upperlimit THEN angle=angle-3600 ELSEIF angle<lowerlimit THEN angle=angle+3600 ENDIF[/code] Am I doing something wrong? ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=276833#m278334 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)