Knew I was opening a can of worms...
Warrier,
Yep that would do it alright... if... you wanted to return to the line following the gosub.
My initial question was can you break out of a gosub nest... can the gosub be canceled such that a "return" would go nowhere. And from the replys I am getting that you can't.
That being said, if... while nested in a subroutine... the program comes across the original gosub... it does not cancel the original subroutine... rather it increments the stack count by one.
Such as...
Main:
gosub here
goto main
end
Here:
if this goto Main
do that
return
If this is true, the gosubs loop until they violate the stack count and the pic crashes (he purses his lips and makes a pffrrgghh sound). I love sound effects.
:-)
I can write code to get around things alright, but I wanted to just cancel where I was in subroutine and go back to "Main"... not "Return" to the next line following the "gosub".
Ross
break, breaking or broken...
Warrier,
I'm familiar with broken... but not with break.
Is there such a command in PicBasic Pro or is this where I just toss the board and all of it's assundries out the two-story window?
I don't know assembler so if that's where this command comes from can you provide a bit more detail on it's use?
Window open... circuitboard in hand... *pause*
Ross