In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote: No, SUB declare subroutines that have an RETURN at the end of them. The nice thing about declaring is that you can specify how many parameters can be passed and the compiler will check that for you. You also can get rid of GOSUB when using declared subroutines. Finally, the calling mechanism allows the subroutines to be placed anywhere in memory ( the compiler builds a jump-table for you ). A FUNC (function) is like a subroutine except that it will return values. Technically a SUB can return a byte, but it's usually considered better form to use FUNC when the routine will return a value. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=181255#m181281 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)