function vector_lex_next_test ( )

%*****************************************************************************80
%
%% vector_lex_next_test() tests vector_lex_next().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 October 2022
%
%  Author:
%
%    John Burkardt
%
  d = 3;
  b = 3;
  more = false;
  fprintf ( 1, '\n' );
  fprintf ( 1, 'vector_lex_next_test():\n' );
  fprintf ( 1, '  vector_lex_next() generates integer vectors of length D\n' );
  fprintf ( 1, '  with entries between 1 and B, in lexicographic order.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The dimension d = %d\n', d );
  fprintf ( 1, '  The base b =      %d\n', b );
  fprintf ( 1, '\n' );
  
  a = [];
  i = 0;
  
  while ( true )

    [ a, more ] = vector_lex_next ( d, b, a, more );

    if ( ~ more )
      break
    end

    i = i + 1;
    fprintf ( 1, '  %d:  ', i );
    disp ( a )

  end

  return
end
