! Program Example from "Essential Fortran 90 & 95" by Loren P. Meissner
! Copyright 1996. Copying for sale requires permission from the author.
! Otherwise, distribution is permitted if these three lines are included.

! Example 5.14. Input and output of whole arrays and array sections.
  program F14
    implicit none
    integer, parameter :: ARRAY_SIZE = 5
    real, dimension(ARRAY_SIZE) :: Data_Array
! start program F14
    read (unit = *, fmt = *) Data_Array  ! Whole array
    write (unit = *, fmt = *) "The first four values are: ", Data_Array(: 4)  ! Array section
    stop
  end program F14
