function value = i4vec_eq ( a1, a2 )

%*****************************************************************************80
%
%% i4vec_eq is true if two i4vec's are equal.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 October 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer A1(N), A2(N), two vectors to compare.
%
%  Output:
%
%    logical VALUE, is true if every pair of elements A1(I)
%    and A2(I) are equal, and false otherwise.
%
  n1 = length ( a1 );
  n2 = length ( a2 );

  if ( n1 ~= n2 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'i4vec_eq - Fatal error!\n' );
    fprintf ( 1, '  Vectors must be of the same length.\n' );
    error ( 'i4vec_eq - Fatal error!' );
  end

  value = all ( a1 == a2 );

  return
end
