module read_data_module implicit none contains subroutine read_data(file_name, raw_data, how_many) implicit none character (len=*), intent (in) :: file_name integer, intent (in) :: how_many real, intent (out), allocatable, dimension (:) :: raw_data ! local variables integer :: i allocate (raw_data(1:how_many)) open (unit=1, file=file_name, status='old') do i = 1, how_many read (unit=1, fmt=*) raw_data(i) end do end subroutine end module module sort_data_module implicit none contains subroutine sort_data(raw_data, how_many) implicit none integer, intent (in) :: how_many real, intent (inout), dimension (:) :: raw_data call quicksort(1, how_many) contains recursive subroutine quicksort(l, r) implicit none integer, intent (in) :: l, r ! local variables integer :: i, j real :: v, t i = l j = r v = raw_data(int((l+r)/2)) do do while (raw_data(i)j) exit end do if (l