! 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.

  module I04M
    implicit none
    public :: Row_Swap
  contains
    subroutine Row_Swap( A, Row_1, Row_2 )
      real, dimension(:, :), intent(in out) :: A
      integer, intent(in) :: Row_1, Row_2
      real, dimension(size( A, dim = 2 ) ) :: Auxiliary_Row
  ! start subroutine Row_Swap
      Auxiliary_Row = A(Row_1, :)
      A(Row_1, :) = A(Row_2, :)
      A(Row_2, :) = Auxiliary_Row
      return
    end subroutine Row_Swap
  end module I04M
