I was rather surprised to see this result (on Nag f90 on HP-UX and Cray f90
on T3E)
cat temp1.f90
program temp1
integer,allocatable :: a(:,:,:)
allocate (a(0:2,0:2,0:2))
print *, LBOUND(a)
print *, LBOUND(a(:,:,:))
print *, UBOUND(a)
print *, UBOUND(a(:,:,:))
end program temp1
frjb@fr0400: a.out
0 0 0
1 1 1
2 2 2
3 3 3
Why does adding the colon notation change the result?
John Bray, Numerical Weather Prediction Tel: +44 (0) 1344 854035
|