simon
Joined: 05 Jul 2006 Posts: 270
|
Posted: Mon Apr 21, 2008 12:49 pm Post subject: SIZE does not return 0 after DEALLOCATE |
|
|
Why does the following program not indicate siez=0 in the third row of output? (The smiley face in line 3, seems to be an error, the code is written as ( : ) without the spaces.)
PROGRAM p
IMPLICIT NONE
INTEGER, DIMENSION( , ALLOCATABLE :: i
INTEGER :: ios
!
WRITE (UNIT=*,FMT=*) ALLOCATED(i),SIZE(i)
ALLOCATE (i(5),STAT=ios)
WRITE (UNIT=*,FMT=*) ALLOCATED(i),SIZE(i)
DEALLOCATE (i)
WRITE (UNIT=*,FMT=*) ALLOCATED(i),SIZE(i)
!
END PROGRAM p |
|