Nested Gosubs
Fairlight
fairlite at fairlite.com
Sun Oct 31 13:15:52 PST 2004
Is it just me, or did John Esak say:
>
> This would, of course, be bad. She is really saying... "Never do a GOSUB
> that doesn't RETURN before it gives back control to the user.
Gotcha. Thanks for the detailed example. I wasn't actually aware of that
constraint, so I'm glad you clarified it.
I don't suppose someone would consider wishlisting an addition where GOSUB
actually backs off when it encounters any statement tantamount to END?
I've known for 11 years that SCREEN acts as a de-facto END (although I
thought there was a situation in which you needed and END after SCREEN
anyway, back in the day. It seems like the GOSUB system should respect
that somehow.
Actually, without thinking for an hour on all implications and just musing
off the cuff, shouldn't an END (or equivalent statement) not just back off
one nesting, but effectively nuke -all- active GOSUB's on the stack, since
processing ends at that point--there's no need to track them further than
the end of the road, is there? Seems like the logic equivalent of a memory
leak, here.
Just a thought.
At any rate, thanks for the example. Clear, concise, and very helpful in
understanding it. I have agree with many others and compliment you on such
crystalline examples--excellent!
mark->
--
Bring the web-enabling power of OneGate to -your- filePro applications today!
Try the live filePro-based, OneGate-enabled demo at the following URL:
http://www2.onnik.com/~fairlite/flfssindex.html
More information about the Filepro-list
mailing list