Re: Recursive Call
- From: Joe Zitzelberger <joe_zitzelberger@xxxxxxxxxx>
- Date: Tue, 08 Nov 2005 23:47:08 -0500
In article <dkgfnn$1a4n$1@xxxxxxxxxxxxxxxxxxxx>,
"Chuck Stevens" <charles.stevens@xxxxxxxxxx> wrote:
> "Judson McClendon" <judmc@xxxxxxxxxxxxx> wrote in message
> news:lNOaf.14$%k.4@xxxxxxxxxxxxxxxxxxxxxxxxx
> > "Chuck Stevens" <charles.stevens@xxxxxxxxxx> wrote:
> >> Note that within COBOL that is compliant with the three most recent
> >> standards, both direct and indirect recursion is prohibited. If an
> >> implementor allows it (or provides additional syntax to support it), it's
> >> an extension and it does whatever the implementor says it does.
> >
> > Why in the world would recursion be forbidden? I haven't used it often in
> > COBOL, but I did find it extremely useful in writing a parts explosion
> > module once. The code, which was pretty elegant, would have been somewhat
> > tacky without recursion.
>
> While recursion isn't a big issue for stack-oriented machines like the
> Unisys MCP systems -- on which the compiler has to go to the trouble to
> generate code to *prevent* recursion -- I believe there was some reluctance
> on the part of J4 to require it until it could be ascertained what the
> pitfalls were and what the appropriate syntax was.
I'm unfamiliar with a non-stack oriented, non-obsolete, machine that has
existed since the 85 standard was written.
Even the IBM mainframe, originally a non-stack machine, made hardware
allowances for stack-style things (e.g. Program Call & Return) somewhere
in the 70's.
Stack machines really have proven their worth over non-stack machines.
What isn't at least simulating a stack these days?
.
- Follow-Ups:
- Re: Recursive Call
- From: Arnold Trembley
- Re: Recursive Call
- References:
- Recursive Call
- From: Paolo
- Re: Recursive Call
- From: Chuck Stevens
- Re: Recursive Call
- From: Judson McClendon
- Re: Recursive Call
- From: Chuck Stevens
- Recursive Call
- Prev by Date: Re: help-me with a little cobol project
- Next by Date: Re: Recursive Call
- Previous by thread: Re: Recursive Call
- Next by thread: Re: Recursive Call
- Index(es):
Relevant Pages
|