Mutual recursion: Difference between revisions

Content added Content deleted
Line 114: Line 114:
=={{header|Fortran}}==
=={{header|Fortran}}==


As far as the code of the two functions is inside the same "block" (module or program) we don't need special care. Otherwise, we should "load" at least the interface of the other function (each module will load mutually the other; of course the compiler won't enter in a infinite loop), e.g. by using a "<tt>use</tt>" (we do that if M and F function are inside different modules)
As long as the code of the two functions is inside the same "block" (module or program) we don't need special care. Otherwise, we should "load" at least the interface of the other function (each module will load mutually the other; of course the compiler won't enter in a infinite loop), e.g. by using a "<tt>use</tt>" (we do that if M and F function are inside different modules)


{{works with|Fortran|95 and later}}
{{works with|Fortran|95 and later}}