for next inside gosub???
4 yrs later
Posts: 14
Is it a no-no to place a for next loop inside a gosub on a bs2?
The program seems to stop executing at the return point.....
The program seems to stop executing at the return point.....
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
the GOSUB executes, but it stops running just before (shown by debug onto LCD executing) and does not execute the RETURN, which brings it back to a SEROUT to the LCD with different debug text.
hmmmm....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
I don't see tareout. If you break out of a gosub with a goto the return becomes invalid (as I understand it, but I'm more often shown my erroneous ways by TWKMTI (those who know more than I)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
Post Edited (TechnoRobbo) : 5/20/2007 4:24:58 PM GMT
I replaced the GOSUB with a GOTO, and it runs quite well. I would really rather use GOSUB.
So, directing to a label outside the GOSUB will break the loop? interesting. Perhaps I should move tareout: inside the subroutine....