Nested Gosubs
Brian K. White
brian at aljex.com
Sun Oct 31 14:43:41 PST 2004
> 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.
I don't think it's something fp should try to second guess. I can imagine
totally legitimate routines that enter into a gosub while in one field, and
return while in some completely other field. I can't imagine a situation
where it _needs_ to be done that way but there might be some but even if not
I think that would be a case of fp overstepping it's bounds and dictating
programming style.
It might not be technically possible for the interpreter to know for sure
the right thing to do anyways given things like goto and fall-through.
Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
More information about the Filepro-list
mailing list