From 1000238204296249660
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,fb1a92fa405c930c
X-Google-Attributes: gidf78e5,public
From: clamage@eng.sun.com (Steve Clamage)
Subject: Re: nested functions
Date: 1999/06/15
Message-ID: <7jvh45$5ms$1@engnews1.eng.sun.com>#1/1
X-Deja-AN: 489736430
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <7jd4c5$nup$1@nnrp1.deja.com> <7jjjr6$r02$1@nnrp1.deja.com> <7jma5c$i85@abyss.West.Sun.COM> <37dd56e1.565652003@nntp.ix.netcom.com> <lz%73.9759$wk2.183779@newscene.newscene.com> <7jro7p$ntt$1@nnrp1.deja.com> <_xh83.25803$wk2.383242@newscene.newscene.com> <082d72743190c69CPIMSSMTPU07@email.msn.com>
X-Original-Date: 13 Jun 1999 05:55:17 GMT
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 929427960 11624 128.250.29.16 (15 Jun 1999 06:26:00 GMT)
Organization: Sun Microsystems Inc., Mountain View, CA
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN2Xx5+EDnX0m9pzZAQGPSQGAn1Bxa7I2OBzxM0JPq7DM56jbTO7vLuFJ j5MPDAh2sh69gv3jFII1GsazEGk5ACDM =f/qD
NNTP-Posting-Date: 15 Jun 1999 06:26:00 GMT
Newsgroups: comp.std.c++

"G.B." <gb@web1.ucar.edu> writes:

>John Potter <jpotter@falcon.lhup.edu> wrote in message

>> Now that we have a type for it, there is no reason for not having
>> variables of that type anywhere.

>You can have a var of that type anywhere. I only meant it is useless outside
>of the scope of parent function.

Huh? You can do it in Pascal, for example.

But using it outside the scope of the parent function would
be the only point of having local funcitons in C++, it seems
to me.

Maybe you could explain how local functions that could not be
called from outside the enclosing function scope would be a
useful addition to C++. What programming problems can be solved
more easily? It seems to me that a class with member functions
solves all the same problems, and does a better job of it.

--
Steve Clamage, stephen.clamage@sun.com
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



