JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Sat Mar 31, 2012 5:39 am Post subject: |
|
|
In the following example, it shows there are 13x2 elements in either array, but the size of each element depends on what it is defined. Size does not return the upper limit of the array.
Code: | TYPE ACTIVE_DAY_RECORD
integer*2 trains
integer*2 ships
integer*2 movements
END TYPE ACTIVE_DAY_RECORD
!
type (active_day_Record), parameter :: active_day_zero = active_day_record (0, 0, 0)
!
type (active_day_record) active_days(-4:8,2)
integer*4 aa(-4:8,2)
!
aa = 0
active_days = active_day_zero
!
write (*,*) 'size aa ', size (aa,1), size(aa)
write (*,*) 'size active_days ', size (active_days,1), size (active_days)
!
end |
|
|