Article View: comp.std.c
Article #2308Re: functions within functions
From: Dave P. Schaumann
Date: Tue, 22 Jan 1991 14:02
Date: Tue, 22 Jan 1991 14:02
22 lines
1290 bytes
1290 bytes
In article <1991Jan22.081057.8567@ithaca.uucp> garry@ithaca.uucp (Garry Wiegand) writes:
|When the C standards committee was meeting, did they discuss allowing
|the declaration of functions within functions? Ie, making:
|
| void outside(void) {
| static void inside(void) {}
| inside();
| }
|
|count as legal C? Neither my quasi-Ansi C nor my g++ compiler will
|accept it.
C has never allowed nested function definitions. I don't know for sure why,
but I would guess (given that C is intended for generating clean, fast code)
that they didn't want to get involved with closures.
|Garry Wiegand --- Ithaca Software, Alameda, California
|...!uunet!ithaca!garry, garry%ithaca.uucp@uunet.uu.net
Dave Schaumann | And then -- what then? Then, future...
dave@cs.arizona.edu | -Weather Report
Technical Details
Message-ID:
<710@caslon.cs.arizona.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!ncar!noao!arizona!daveReferences:
<1991Jan22.081057.8567@ithaca.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!ncar!noao!arizona!dave From: dave@cs.arizona.edu (Dave P. Schaumann) Newsgroups: comp.std.c,comp.std.c++ Subject: Re: functions within functions Message-ID: <710@caslon.cs.arizona.edu> Date: 22 Jan 91 14:02:21 GMT References: <1991Jan22.081057.8567@ithaca.uucp> Followup-To: comp.std.c Organization: U of Arizona CS Dept, Tucson Lines: 22