www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Nested Functions

↑ ↓ ← 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
↑ ↓ "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

 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
↑ ↓ 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

 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
↑ ↓ → "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

 were part of C99, but it appears that they are just a GNU-C extension - a

 useful one though. I guess I'll have to stick with GNU and keep thinking

 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

 mature by the month. Congratulations to this development!

Thanks!
Jan 13 2005