i have a main program and i have some subs. IN my main program i have line number 10. When i run a sub, when it finishes i want it to go to line 10 of the main program. How do you get a sub to go to the main program.
You can't, the only thing you can do, is use EXIT SUB to end the sub prematurely. Then, if another sub did not call it, it will return to the main prog right after where it was last called.
quebasic2 is correct. You can't simply tell a sub to specifically goto to a line lable in the main (unless, if memory serves, it is an error trapping code.)
When you CALL sub-name the next line is not execuited until the EXIT SUB was reached. So my suggestion is to create a "global" variable; in the "sub"...change it to something else like gblGoto10 = -1, THEN in the line following the "call" add a validation to take you to LineLable 10.
The only other option is to post some code for us to make suggestions.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.