home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!stanford.edu!CSD-NewsHost.Stanford.EDU!Xenon.Stanford.EDU!amorgan
- From: amorgan@Xenon.Stanford.EDU (Crunchy Frog)
- Subject: Re: Functions Within Functions
- Message-ID: <1992Jul29.194054.19035@CSD-NewsHost.Stanford.EDU>
- Sender: news@CSD-NewsHost.Stanford.EDU
- Organization: Computer Science Department, Stanford University.
- References: <Bs5w39.5ox@news.larc.nasa.gov>
- Date: Wed, 29 Jul 1992 19:40:54 GMT
- Lines: 12
-
- In article <Bs5w39.5ox@news.larc.nasa.gov>
- wjb@cscsun2.larc.nasa.gov (William J. Bene) writes:
-
- >Is there any way to declare functions within another function like in pascal?
-
- Not according to ANSI C. GCC 2.x allows you to do it so you can use
- that (beware, it is still fairly buggy). BTW - Why do you want to
- do this? Occasionally I imagine it might be useful for encapsulating
- code, but if a function is used in only one place I make it static
- and avoid the problem that way (and have portable code).
-
- C Frog
-