function l4vec_next_test ( )

%*****************************************************************************80
%
%% L4VEC_NEXT_TEST tests L4VEC_NEXT.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    18 November 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 ( 1 )

    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
