Open
Description
Some example programs for the Fortran intrinsics, for example the one for ubound, provide a lot of information but are also a bit complicated. I suggest that a short example for an intrinsic be provided before a longer one. At Fortran Discourse I gave this code for ubound:
program main ! output in comments
implicit none
real :: x(4),y(-4:3),z(5,-3:2,7)
print*,lbound(x),ubound(x) ! 1 4
print*,lbound(y),ubound(y) ! -4 3
print*,lbound(z) ! 1 -3 1
print*,ubound(z) ! 5 2 7
print*,lbound(z,2),ubound(z,2) ! -3 2
end program main