millenavillar wrote:
> I would like to know how can I print the addres of a pointer , in
> Fortran 90. When I try to print the pointer only appear the value of
> the variable that is associated to it. Is there other manner than by
> "loc()"?? (but it only accept the associated variable)
F90 pointers are funny creatures in that almost any reference to them
causes them to be dereferenced.
The "usual trick" with F90 pointers is to place them into a derived
type:
type rpointer
real, pointer :: p(:) => NULL ()
end type
:
type(rpointer) :: my_pointer
:
print '(a,z)', 'the address of my_pointer is: ', loc (my_pointer)
This is also the "usual trick" for defining arrays of pointers.
HTH,
Walt