Article View: comp.std.c
Article #3419Nested functions (was: Re: GOTO single exit point)
From: Paul Long
Date: Thu, 14 Sep 1995 17:07
Date: Thu, 14 Sep 1995 17:07
22 lines
1749 bytes
1749 bytes
lance@eco.twg.com (Lance Kibblewhite) wrote:
>Silly contrived example without using multiple gotos nor nested if
>statements.
[snip:example using nested functions]
Impressive, but scary. This isn't an obfucated-C thread is it? :-) Makes me
glad that C doesn't allow nested functions.
>What do you mean 'C' doesn't have local functions!
>
>Give me a real language with local functions, and a decent optimizer
>anyday.
Although there are C-like languages that support nested functions, e.g., Gnu C,
I've recently learned that the execution model must change to support them. Not
a pretty sight.
--
Paul Long 45:29:14N 122:48:09W
plong@perf.com http://www.teleport.com/~pciwww/
"Where time or intelligence are lacking, a goto may do the job."
- M.E. Hopkins, "A Case for the GOTO," 1972.
Technical Details
Message-ID:
<439nh8$p7o@news0.rain.rg.net>Path:
arc1-ca.pugleaf.net!usenet.eel.ufl.edu!pacifier!rainrgnews0!usenetReferences:
<3vn1ht$kj8@martha.utk.edu> <41cke4$gtd@sparcserver.lrz-muenchen.de> <41glno$3a0@caip.rutgers.edu> <41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <41t0sb$15e@news0.rain.rg.net> <DE6G2z.JJD@crdnns.crd.ge <42s5su$4h8@inforamp.net> <42u8sr$hv8@bud.shadow.net> <437fk4$5no@eco.twg.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!usenet.eel.ufl.edu!pacifier!rainrgnews0!usenet From: Paul Long <plong@perf.com> Newsgroups: comp.std.c,comp.lang.c Subject: Nested functions (was: Re: GOTO single exit point) Date: 14 Sep 1995 17:07:52 GMT Organization: Performance Computing Incorporated Message-ID: <439nh8$p7o@news0.rain.rg.net> References: <3vn1ht$kj8@martha.utk.edu> <41cke4$gtd@sparcserver.lrz-muenchen.de> <41glno$3a0@caip.rutgers.edu> <41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <41t0sb$15e@news0.rain.rg.net> <DE6G2z.JJD@crdnns.crd.ge <42s5su$4h8@inforamp.net> <42u8sr$hv8@bud.shadow.net> <437fk4$5no@eco.twg.com> NNTP-Posting-Host: yosemite.perf.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.1 sun4c) X-URL: news:437fk4$5no@eco.twg.com