I wrote:
>
> In cases similar to your example, I normally add one intemediate
> interface:
>
> module m_test
> contains
> subroutine test_n(a,n)
> integer,intent(in) :: n
> real ,intent(??) :: a(n)
> call test(a(1)) ! shouldn't it be "test(a(1),n)"?
> end subroutine test_n
> end module m_test
>
> program main
> use m_test,only : test_n
> real,dimension(:),pointer :: pa
> pa => [...] ! are you sure it is contiguous?
> call test_n(pa) ! if it copies, it would be here.
Sorry! It should really be
call test_n(pa,size(pa))
> end program main
[...]
Don't every trust the first release :-)
Jing
--
________________________________ _-__-_-_ _-___---
Jing Guo, [log in to unmask], (301)614-6172(o), (301)614-6297(fx)
Data Assimilation Office, Code 910.3, NASA/GSFC, Greenbelt, MD 20771
|