program demo
implicit integer*8(f)
fct(n) = loc(n)
n = 10
print *, '@(n) in demo: ' , loc(n)
print *, '@(n) in fct : ' , fct(n)
print *, (loc(n) .eq. fct(n))
end
The first n (parameter) in line 3 is in the scope of fct function statement.
The second n in line 3 is in the scope of fct function statement. It is an access of the first n in line 3. Currently we put this n in demo scope which is not the case.
from line 4 to the end, n is in the scope of demo program.
Note: the nin fct and n in demo are implicitly typed.
The first
n(parameter) in line 3 is in the scope offctfunction statement.The second
nin line 3 is in the scope offctfunction statement. It is an access of the firstnin line 3. Currently we put thisnindemoscope which is not the case.from line 4 to the end,
nis in the scope ofdemoprogram.Note: the
ninfctandnindemoare implicitly typed.