function l4vec_next_test ( )

%*****************************************************************************80
%
%% l4vec_next_test() tests l4vec_next().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    31 May 2015
%
%  Author:
%
%    John Burkardt
%
  n = 3;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'l4vec_next_test():\n' );
  fprintf ( 1, '  l4vec_next() generates logical vectors.\n' );
  fprintf ( 1, '\n' );
 
  l4vec(1:n) = 0;

  while ( true )

    fprintf ( 1, '  ' );
    for ( i = 1 : n )
      fprintf ( 1, '%d', l4vec(i) );
    end
    fprintf ( 1, '\n' );

    if ( all ( l4vec(1:n) ) )
      break
    end

    l4vec = l4vec_next ( n, l4vec );
 
  end

  return
end
