In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote: You have terms confused: SUBs aren't really intended to return values, though the can -- but to do so is sloppy programming (my opinion, yours may differ). Redefine like this: [code]GETRPM FUNC 1, 0[/code] Then code the function like this: [code]FUNC GET_RPM ... RETURN RPM ENDFUNC[/code] If the RPM value can be a word then you need to change the declaration to 2. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=274175#m274180 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)