Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!ucsbcsl!grape!panzer From: panzer@grape.ucsb.edu (Panzer, John Robert) Newsgroups: comp.sys.amiga.tech Subject: Re: Can you nest subroutines in C? Message-ID: <2042@hub.ucsb.edu> Date: 28 Jun 89 21:33:27 GMT References: <4470@crash.cts.com> <14753@watdragon.waterloo.edu> Sender: news@hub.ucsb.edu Reply-To: panzer@grape.UUCP (Panzer) Organization: University of California, Santa Barbara Lines: 20 In article <14753@watdragon.waterloo.edu> sjorr@rose.waterloo.edu (Stephen Orr) writes: >In article <4470@crash.cts.com> wade@pnet01.cts.com (Wade Bickel) writes: >> I hope there is a way to create nested functions in C. In general I find >>I like C. Especially the flexability of conditionals afforded in pointer >>manipulations, which is much more powerful than that allowed in Modula-2. > > Unless someone changed the definition of C that I learnt, all >modules in 'C' have the same visibility even main(). This does not mean you >can't get your peice of code running, it just means that the sub-module you >would place with a larger module will be visible to all modules in the program. In fact, if you declare a function (or a variable external to a function) to be static, it will be local to the source file but global to all functions within that file. This provides some degree of modularity, although it does require that each module be in a separate source file. ========================================================================== | John Panzer | UC Santa Barbara | | panzer@cornu.ucsb.edu | Department of Computer Violence | ==========================================================================