<Array Assignment Example Program>
Program array_assignment_example Real :: a(5) = (/ 1.,2.,3.,4.,5. /) Real b(3),c(5),d(5) b = a(2:4) c(2:4) = b d(1:3) = a(3:5)} Print *, b Print *, c(2:4) Print *, d(:3) End Program
■ Execution Results
2.0000000 3.0000000 4.0000000 2.0000000 3.0000000 4.0000000 3.0000000 4.0000000 5.0000000