real, dimension(5) :: a = [ 2, 4, 6, 8, 10 ] integer, dimension(2) :: i = [ 2, 4 ] print *, a(i) ! prints 4. 8.
a← 2 4 6 8 10 a[2 4] 4 8