SX/B v1.42.01 - GOSUB nesting

First off not complaining, just learning to convert various BS2xx programs to SX/B!
In the "PBASIC Syntax Guide" for GOSUB it states:
·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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
In the "PBASIC Syntax Guide" for GOSUB it states:
"GOSUB Limitations 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."
·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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Went back and RE-READ the SX/B Gosub documentation, sure enough in the Quick Facts section, there it is, "Maximum Nested GOSUBs = 8"
DOH!!!!!!!!!!!!!!!!!!
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
Post Edited (Mike Cook) : 11/16/2005 4:21:36 AM GMT
Although I assume everybody has STACKX or OPTIONX mode on when using SX2Xes (both are synonymes). Nevertheless you should keep an eye on it. Without setting it, subroutine nesting will be limited to just two. Imagine what happens when you remove this setting by mistake in a program later - it may cost you some sleepless nights.
As long as you are using SX/B, don't worry, the compiler will automatically generate a DEVICE STACKX directive fir you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G