Nested functions in C (was: Understanding Packages)

Henry Spencer henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
Tue Apr 20 20:07:03 UTC 2004


On Tue, 20 Apr 2004, Lennart Sorensen wrote:
> Well I am sure C++ does allow it (which is probably why gcc allows it in
> C too, since it was easy).

Nope, nested functions aren't legal in C++ either.

They *are* legal in Pascal and a number of other languages.  Note that the
early GNU folks, by and large, did not come from a Unix/C background and
consequently felt some of the limitations of C more than experienced C
programmers did.  Several of their non-standard extensions came out of
wanting to make C look a bit more like the languages they grew up on. 

                                                          Henry Spencer
                                                       henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list