function byname_test ( )

%*****************************************************************************80
%
%% byname_test() tests byname().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 May 2021
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../persistence' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'byname_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test byname(), with the interface:\n' );
  fprintf ( 1, '    value_out = byname(action,name,value_in)\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '    byname ( "print", "*" );\n' );
  byname ( "print", "*" );
  fprintf ( 1, '    alpha = byname ( "set", "alpha", 1.0 );\n' );
  alpha = byname ( "set", "alpha", 1.0 )
  fprintf ( 1, '    beta = byname ( "set", "beta", 99 );\n' );
  beta = byname ( "set", "beta", 99.0 );
  fprintf ( 1, '    byname ( "set", "gamma", alpha + beta );\n' );
  byname ( "set", "gamma", alpha + beta );
  fprintf ( 1, '    byname ( "print", "*" );\n' );
  byname ( "print", "*" );
  fprintf ( 1, '    gamma = byname ( "get", "gamma" );\n' );
  gamma = byname ( "get", "gamma" );
  fprintf ( 1, '    byname ( "set", "gamma", 2.0*gamma );\n' );
  byname ( "set", "gamma", 2.0*gamma );
  fprintf ( 1, '    byname ( "print", "gamma" );\n' );
  byname ( "print", "gamma" );
  fprintf ( 1, '    beta = byname ( "set", "beta", "Shazam!" );\n' );
  beta = byname ( "set", "beta", "Shazam!" );
  fprintf ( 1, '    byname ( "print", "*" );\n' );
  byname ( "print", "*" );
  fprintf ( 1, '    byname ( "reset" );\n' );
  byname ( "reset" );
  fprintf ( 1, '    byname ( "print", "*" );\n' );
  byname ( "print", "*" );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'byname_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../persistence' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

