Problem with array size
- From: nath.domi@xxxxxxxx (D Marty)
- Date: 24 Apr 2005 15:54:39 -0700
Hello,
I don't understand why this following program fail and particulary why
the size of the array "A()" in subroutine "titi" is equal to zero.
Who know how can I have in subroutine "titi" the size of the array
"A()".
Thank you very much for your help.
D.Marty
Program toto
integer A(3)
A(1)=1
A(2)=2
A(3)=3
call titi(A)
end
subroutine titi(A)
integer A(*)
integer, ALLOCATABLE:: B(:)
allocate(B(size(A)))
B=A
write(*,*) B(1),B(2),B(3),size(A),size(B)
end
.
- Follow-Ups:
- Re: Problem with array size
- From: Richard E Maine
- Re: Problem with array size
- From: Ron Shepard
- Re: Problem with array size
- Prev by Date: Re: Detect EOF for direct access, unformatted files?
- Next by Date: Re: Problem with array size
- Previous by thread: Representing structures for simulations
- Next by thread: Re: Problem with array size
- Index(es):
Relevant Pages
|