In SX Microcontrollers, SX/B Compiler and SX-Key Tool, kd5dhu wrote: [2] First off not complaining, just learning to convert various BS2xx programs to SX/B![/2] [2] "GOSUB Limitations[/2] Only a limited number of GOSUBs are allowed per program (as shown in above), and they may be nested only four levels deep. In other words, the subroutine that's the destination of a GOSUB can contain a GOSUB to another subroutine, and so on, to a maximum depth (total number of GOSUBs before the first RETURN) of four. Any deeper, and the program will "forget" its way back to the starting point (the instruction following the very first GOSUB). When GOSUBs are nested, each RETURN takes the program back to the instruction after the most-recent GOSUB. As is mentioned above, if the BASIC Stamp encounters a RETURN without a previous GOSUB, the entire program starts over from the beginning. Take care to avoid these phenomena." [/code] I have read the GOSUB documentation in the SX/B help file and did not see this type of limitation, was wondering if this applies to SX/B or if there was a nesting limitation? Thanks, Mike ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=96511 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)