Re: Is multi-level function return possible?

Ian Lance Taylor <ian@airs.com>
Fri, 14 Mar 2014 16:55:34 -0700

          From comp.compilers

Related articles
[12 earlier articles]
Re: Is multi-level function return possible? marcov@toad.stack.nl (Marco van de Voort) (2014-03-14)
Re: Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-14)
Re: Is multi-level function return possible? kaz@kylheku.com (Kaz Kylheku) (2014-03-14)
Re: Is multi-level function return possible? kaz@kylheku.com (Kaz Kylheku) (2014-03-14)
Re: Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-14)
Re: Is multi-level function return possible? marcov@toad.stack.nl (Marco van de Voort) (2014-03-14)
Re: Is multi-level function return possible? ian@airs.com (Ian Lance Taylor) (2014-03-14)
Re: Is multi-level function return possible? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2014-03-15)
Re: Is multi-level function return possible? usenet@bitblocks.com (Bakul Shah) (2014-03-15)
Re: Is multi-level function return possible? noitalmost@cox.net (noitalmost) (2014-03-15)
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-16)
Re: Is multi-level function return possible? marcov@toad.stack.nl (Marco van de Voort) (2014-03-16)
Re: Is multi-level function return possible? news@cuboid.co.uk (Andy Walker) (2014-03-16)
[12 later articles]
| List of all articles for this month |

From: Ian Lance Taylor <ian@airs.com>
Newsgroups: comp.compilers
Date: Fri, 14 Mar 2014 16:55:34 -0700
Organization: Compilers Central
References: 14-03-020 14-03-022 14-03-031
Keywords: Pascal, C
Posted-Date: 15 Mar 2014 10:05:31 EDT

George Neuner <gneuner2@comcast.net> writes:


> On Tue, 11 Mar 2014 13:04:57 GMT, anton@mips.complang.tuwien.ac.at
> (Anton Ertl) wrote:
>
>>... in Pascal you can goto a label that is in a containing procedure
>>or function, even across several levels. That is a very rarely used
>>feature of the language, and Wirth removed it (along with goto) from
>>his later languages.
>
> Interesting. I was not aware of this, and it is not mentioned in any
> of several Pascal books I have from the early 80's. Other than
> Wirth's own, I wonder how many implementations actually allowed it?


I don't know about Pascal implementations, but GCC supports nested
functions as an extension to C, and supports doing a goto to a label
defined in an enclosing function.


There is an example in the docs at
http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Nested-Functions.html .


Ian


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.