Re: Recursive Call



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?
.



Relevant Pages

  • Re: Recursively enumerable sets
    ... variations) and the other is a definition of 'Turing computable' (and ... Turing machines, but rather, ordinarily, it has an inductive ... recursion, and minimization) regarding the number theoretic functions. ... IMMEDIATE as the ordinary definitions, ...
    (sci.math)
  • Re: Recursive Functions
    ... >> Computing integer powers of numbers is fairly common in scientific ... >> programming, and is one of the relatively few things missing from C used ... Some processors do recursion faster ... version given by Knuth, on Pentium-class machines. ...
    (comp.lang.c)
  • Re: __attrte__((constructor)) and dlopen
    ... machines. ... Did you compile it exactly as I wrote or did you change anything? ... Same output on Solaris 9, ... In order to understand recursion you must first understand recursion. ...
    (comp.unix.programmer)
  • Re: Lost connection to shared drive/computer after install Win XP
    ... > an office on a university campus, and all these machines are on the same ... > subnet, and no new intervening hardware changed from the w2k to XP ... If you login locally at the target server, ... See Recursion. ...
    (comp.security.firewalls)
  • Re: CoBOL moved to OO
    ... the single thing that distinguishes old old old COBOL from all of the ... Programming with any language that allows recursion is definitely a paradigm ... of new things are possible with that alone (way short of use of the new syntax ... Yet Class methods and data are part of object orientation. ...
    (comp.lang.cobol)