Programming recursively defined functions infortran
- 30 Downloads
Various approaches to the problem of programming recursively defined functions infortran are discussed. The only acceptable method in ASAfortran is shown to be most easily programmed using a stack containing not addresses, but function arguments. The stack is built up and, when full, the function is constructed from the stack elements. A sequence of examples of increasing complexity is given to demonstrate the technique, including one in which a queue is found to be more appropriate than a stack. The emphasis throughout is on the simplicity of the technique.
Key wordsfortran recursive functions stack
Unable to display preview. Download preview PDF.
- 1.J. A. Ayres,Commun. ACM,6 667–668 (1963).Google Scholar
- 2.A. C. Day,Fortran Techniques with Special Reference to Non-numerical Applications (Cambridge University Press, Cambridge, 1972).Google Scholar
- 3.H. A. Maurer and M. R. Williams,A Collection of Programming Problems and Techniques (Prentice Hall, Englewood Cliffs, N.J., 1972).Google Scholar
- 4.J. Morris,Software Age 38–42 (January 1969).Google Scholar
- 5.H. G. Rice,Commun. ACM 8, 114–115 (1965).Google Scholar