In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Jon Williams wrote: When definining subs that could have multiple parameters, you need to do it like this: GO_FORWARD SUB 0, 1 Then check and pick-up any paramters before doing anything else in you sub -- otherwise the internal variables that carry parameters (__PARAMx) could get clobbered. GO_FORWARD: IF __PARAMCNT = 1 THEN temp1 = __PARAM1 ELSE temp1 = 1 ENDIF servo1 = 75 servo2 = 200 IF temp1 > 0 THEN PAUSE temp1 * 250 ENDIF RETURN ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=88882#m88886 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)