Specifies whether external subprograms may be called recursively.
Not recommended.
.-norecur-. >>- -q--+-recur---+--------------------------------------------><
@PROCESS:
@PROCESS RECUR | NORECUR
-qnorecur
For new programs, use the RECURSIVE keyword, which provides a standards-conforming way of using recursive procedures.
If you specify the -qrecur option, the compiler must assume that any procedure could be recursive. Code generation for recursive procedures may be less efficient. With the RECURSIVE keyword, you can specify exactly which procedures are recursive.
! The following RECUR recursive function:
@process recur
function factorial (n)
integer factorial
if (n .eq. 0) then
factorial = 1
else
factorial = n * factorial (n-1)
end if
end function factorial
! can be rewritten to use F90/F95 RECURSIVE/RESULT features:
recursive function factorial (n) result (res)
integer res
if (n .eq. 0) then
res = 1
else
res = n * factorial (n-1)
end if
end function factorial