Article View: comp.sys.amiga.tech
Article #319Re: Can you nest subroutines in C?
From: Kevin Klop
Date: Mon, 03 Jul 1989 05:45
Date: Mon, 03 Jul 1989 05:45
39 lines
1603 bytes
1603 bytes
In article <4525@crash.cts.com> wade@pnet01.cts.com (Wade Bickel) writes:
> Besides, as I have already pointed out, static variables do not cut it
>as they will not generate a new level of locals on a recursive call. The
>whole point of nesting is to create an autonomous sub-environment which can
>be called recursively forces such an environment to be restricted to a
>single routine.
>
>
>
> Thanks,
>
>
> Wade.
Wade, if you wish to declare a variable that is local to a function
for recursive calls, then:
MyRecursiveFunction()
{
char AVariableThatIsInstantiatedEachTimeThisFunctionIsCalled;
.
.
,
};
Does it. Am I misunderstanding your question?
As to Modula-2 vs. C, I too wish to avoid that sort of discussion. :^)
-- Kevin --
Kevin Klop {uunet|rutgers|amiga}!cbmvax!kevin
Commodore-Amiga, Inc.
The number, 111-111-1111 has been changed. The new number is:
134-253-2452-243556-678893-3567875645434-4456789432576-385972
Disclaimer: _I_ don't know what I said, much less my employer.
Technical Details
Message-ID:
<7200@cbmvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cbmvax!kevinReferences:
<4525@crash.cts.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cbmvax!kevin From: kevin@cbmvax.UUCP (Kevin Klop) Newsgroups: comp.sys.amiga.tech Subject: Re: Can you nest subroutines in C? Message-ID: <7200@cbmvax.UUCP> Date: 3 Jul 89 05:45:58 GMT References: <4525@crash.cts.com> Reply-To: kevin@cbmvax.UUCP (Kevin Klop) Organization: Commodore Technology, West Chester, PA Lines: 39