Address of a variable: Difference between revisions

→‎{{header|Fortran}}: applied code style guide: print instead of write, aligning double colons, etc.
(→‎{{header|Fortran}}: applied code style guide: print instead of write, aligning double colons, etc.)
Line 821:
{{works with|Fortran|90 and later}}
<lang fortran>program test_loc
implicit none
 
implicit none
integer :: i
real :: r
 
i = loc (r)
write (*, '(i0)') i
 
i = loc (r)
end program test_loc</lang>
print *, i
end program test_loc</lang>
Note: <code>loc</code> is a common extension that is implemented
by e.g. the Intel Fortran Compiler, G95 and gfortran.
Anonymous user