Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!zodiac!joyce!sri-unix!garth!smryan From: smryan@garth.UUCP (Steven Ryan) Newsgroups: comp.lang.c Subject: Re: Should I convert FORTRAN code to C? Summary: Recursively calling procedures which are recursively calling proce Message-ID: <901@garth.UUCP> Date: 8 Jul 88 18:48:44 GMT References: <2742@utastro.UUCP> <4700015@m.cs.uiuc.edu> <5236@ihlpf.ATT.COM> Reply-To: smryan@garth.UUCP (Steven Ryan) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 14 >>Recursion can *always* be >>eliminated, if necessary by setting up an auxiliary stack. > >If you are using an auxiliary stack, then you haven't eliminated recursion, >you have just moved it from being implicitly done by the function call Recursion usually refers to direct or indirect self-calling. Using an explicit auxillary stack with a loop is then elimenating recursion. An auxillary stack can be added to any loop (sensibly or not), so this means every loop is potentially recursive. In this case the term 'recursion' no longer conveys useful information. It may sound like it's all done with mirrors (it is), but the distinction is useful.