Open acikek opened 3 years ago
subroutine example(example)
integer :: example
call foo(example)
end subroutine
Which example
gets passed?
Looks like that's an oversight on my part. Nonetheless, the integer variable. If you were going to pass the subroutine as an argument, you wouldn't have one of the arguments for itself be named the same. As far as I'm aware, many languages allow this scope redefinition.
I don't like the idea anymore after you brought that to my attention, although I'd like this issue to stay open in case there's any more comments to address.
This seems like an oversight. Currently, this is considered a syntax error. Since, in non-recursive functions or subroutines, itself cannot be called, there is no reason to disallow this. Here is an example: