function integer_print_test ( )

%*****************************************************************************80
%
%% integer_print_test looks at integer print formatting.
%
%  Modified:
%
%    08 June 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'integer_print_test\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  What options are there for printing large integers?\n' );

  a = [ 1; ...
        12; ...
        123; ...
        1234; ...
        12345; ...
        123456; ... 
        1234567; ...
        12345678; ...
        123456789; ...
        1234567890; ...
        12345678901; ...
        123456789012; ...
        1234567890123; ...
        12345678901234; ...
        123456789012345 ];
%
%  1) Print by stating name.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Print by stating variable name:\n' );
  fprintf ( 1, '\n' );
 
  a
%
%  2) Print using DISP().
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Print using DISP():\n' );
  fprintf ( 1, '\n' );
 
  disp ( a )
%
%  3) FPRINTF()
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Print using fprintf() and %%15d format:\n' );
  fprintf ( 1, '\n' );
  for i = 1 : 15
    fprintf ( 1, '%15d\n', a(i) );
  end
%
%  4) format SHORT and state name.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Print by FORMAT SHORT and stating variable name:\n' );
  fprintf ( 1, '\n' );
 
  format short

  a
%
%  5) format LONG and state name.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Print by FORMAT LONG and stating variable name:\n' );
  fprintf ( 1, '\n' );
 
  format long

  a
%
%  6) Suppose ONE entry is slightly not an integer.
%
  a(1) = 1.00000000001;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Suppose ONE entry is slightly not an integer...\n' );
  fprintf ( 1, '  Print using fprintf() and %%15d format:\n' );
  fprintf ( 1, '\n' );
  for i = 1 : 15
    fprintf ( 1, '%15d\n', a(i) );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'integer_print_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

