www.digitalmars.com         C & C++   DMDScript  

c++ - Nested Functions

reply MarsRook <MarsRook_member pathlink.com> writes:
DmC obvoiusly does not like nested functions. Is this correct or did I miss out
something?
Jan 08 2005
parent reply "Walter" <newshound digitalmars.com> writes:
"MarsRook" <MarsRook_member pathlink.com> wrote in message
news:cromug$1ptg$1 digitaldaemon.com...
 DmC obvoiusly does not like nested functions. Is this correct or did I
miss out
 something?
Nested functions are not legal in C or C++. They are legal in D, however, and work with the DMD D compiler.
Jan 08 2005
parent reply MarsRook <MarsRook_member pathlink.com> writes:
In article <crp7uj$2auv$1 digitaldaemon.com>, Walter says...
"MarsRook" <MarsRook_member pathlink.com> wrote in message
news:cromug$1ptg$1 digitaldaemon.com...
 DmC obvoiusly does not like nested functions. Is this correct or did I
miss out
 something?
Nested functions are not legal in C or C++. They are legal in D, however, and work with the DMD D compiler.
Thanks for your reply. My mistake, I had the perception that nested functions were part of C99, but it appears that they are just a GNU-C extension - a very useful one though. I guess I'll have to stick with GNU and keep thinking about writing more portable stuff in future. Otherwise, I have tried your D compiler a couple of times now and it seems to mature by the month. Congratulations to this development!
Jan 08 2005
parent "Walter" <newshound digitalmars.com> writes:
"MarsRook" <MarsRook_member pathlink.com> wrote in message
news:crq9l4$co6$1 digitaldaemon.com...
 Thanks for your reply. My mistake, I had the perception that nested
functions
 were part of C99, but it appears that they are just a GNU-C extension - a
very
 useful one though. I guess I'll have to stick with GNU and keep thinking
about
 writing more portable stuff in future.
I agree they're useful.
 Otherwise, I have tried your D compiler a couple of times now and it seems
to
 mature by the month. Congratulations to this development!
Thanks!
Jan 13 2005