Related articles |
---|
Is multi-level function return possible? noitalmost@cox.net (noitalmost) (2014-03-10) |
Re: Is multi-level function return possible? kaz@kylheku.com (Kaz Kylheku) (2014-03-11) |
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-11) |
Re: Is multi-level function return possible? gneuner2@comcast.net (George Neuner) (2014-03-11) |
Re: Is multi-level function return possible? lkrupp@pssw.com (Louis Krupp) (2014-03-11) |
Re: Is multi-level function return possible? kaz@kylheku.com (Kaz Kylheku) (2014-03-11) |
Re: Is multi-level function return possible? tkowaltowski@gmail.com (Tomasz Kowaltowski) (2014-03-12) |
[41 later articles] |
From: | noitalmost <noitalmost@cox.net> |
Newsgroups: | comp.compilers |
Date: | Mon, 10 Mar 2014 15:46:31 -0400 |
Organization: | Compilers Central |
Keywords: | code, history |
Posted-Date: | 10 Mar 2014 18:59:55 EDT |
Is this a doable thing for a Pascal-like language that is meant to be
compiled? I have a multi-level break which works within a procedure, but the
return across procedure boundaries seems to add a lot of complications.
I don't recall this being discussed in the dragon book, perhaps because it's
just a silly idea. But implementing the multi-level break got me curious
whether it's possible.
[Sure, you can do it. PL/I let you jump out of a routine and I think Algol60
may have, too. You just need to keep your stack frames sufficiently linked
so that you can find the one you want and unwind everything below it. Look
at the way Algol and Pascal reference variables in blocks outside the current
routine and you'll get most of what you need. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.