Recursion Not Supported by FORTRANLast reviewed: December 11, 1995Article ID: Q63819 |
The information in this article applies to:
SUMMARYNeither the FORTRAN 77 language, nor the Microsoft FORTRAN 77 Optimizing Compilers, Microsoft FORTRAN Compilers prior to FORTRAN PowerStation 4.0, supports recursion. For more information, see one of the following references:
MORE INFORMATIONThe FORTRAN 77 standard includes the following statement regarding recursion:
A subprogram must not reference itself, either directly or indirectly.In direct recursion, a subprogram calls itself. According to page 231 of the "Reference" manual, "any attempt at direct recursion results in a compile-time error [F2600: name : directly recursive]." In indirect recursion, a subprogram calls another subprogram that in turn calls the original subprogram before the first subprogram completed execution. According to page 231 of the "Reference" manual, Microsoft FORTRAN does not detect indirect recursion. If an application uses indirect recursion, compile the subprograms involved with the /4Ya compiler option switch to place all local variables on the stack. Doing so provides each instance of the subroutine with its own set of local variables. NOTE: The Fortran 90 standard includes the following statement regarding recursion:
"Transcending a long-standing tradition, Fortran 90 procedures may be recursive." |
Additional reference words: kbinf 1.00 4.00 4.01 4.10 5.00 5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |