function value = r8vec_is_ascending ( n, x )

%*****************************************************************************80
%
%% R8VEC_IS_ASCENDING determines if an R8VEC is (weakly) ascending.
%
%  Example:
%
%    X = ( -8.1, 1.3, 2.2, 3.4, 7.5, 7.5, 9.8 )
%
%    value = true
%
%    The sequence is not required to be strictly ascending.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 October 2006
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the size of the array.
%
%    real X(N), the array to be examined.
%
%  Output:
%
%    logical VALUE, is true if the entries of X ascend.
%
  value = true;

  for i = 1 : n - 1
    if ( x(i+1) < x(i) )
      value = false;
      break;
    end
  end

  return
end
