function r8row_swap_test ( )

%*****************************************************************************80
%
%% R8ROW_SWAP_TEST tests R8ROW_SWAP;
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    19 April 2009
%
%  Author:
%
%    John Burkardt
%
  m = 3;
  n = 4;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8ROW_SWAP_TEST\n' );
  fprintf ( 1, '  R8ROW_SWAP swaps two rows of an R8ROW.\n' );

  k = 0;
  for i = 1 : m
    for j = 1 : n
      k = k + 1;
      a(i,j) = k;
    end
  end

  r8row_print ( m, n, a, '  The original matrix:' );

  row1 = 1;
  row2 = 3;

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Swap rows %d and %d\n', row1, row2 );

  a = r8row_swap ( m, n, a, row1, row2 );

  r8row_print ( m, n, a, '  The modified matrix:' );

  return
end
