function chrpak_test046 ( )

%*****************************************************************************80
%
%% chrpak_test046() tests hex_to_i4() and i4_to_hex().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 June 2007
%
%  Author:
%
%    John Burkardt
%
  test_num = 3;

  i4_test = [ 21, -32, 1776 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'chrpak_test046():\n' );
  fprintf ( 1, '  hex_to_i4(), hexadecimal->integer.\n' );
  fprintf ( 1, '  i4_to_hex(), integer->hexadecimal\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  I  I4_TO_HEX(I)  HEX_TO_I4(I4_TO_HEX(I))\n' );
  fprintf ( 1, '\n' );

  for test = 1 : test_num

    i4 = i4_test(test);
    hex = i4_to_hex ( i4 );
    j4 = hex_to_i4 ( hex );

    fprintf ( 1, '  %8d  %8s  %8d\n', i4, hex, j4 );

  end

  return
end
