function e = p01_param ( action, e )

%*****************************************************************************80
%
%% p01_param() sets or gets the value of the parameter for test function 1.
%
%  Discussion:
%
%    The parameter E is the exponent of X^E.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 December 2013
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    string ACTION, indicates which action is desired.
%    'G' will get the parameter value.
%    'S' will set the parameter value.
%
%    integer E, the new value of the parameter,
%    if ACTION is 'S'.
%
%  Output:
%
%    integer E, the stored vale of the parameter,
%    if ACTION is 'G'.
%
  persistent e_saved;

  if ( isempty ( e_saved ) )
    e_saved = 0;
  end

  if ( action(1) == 'g' || action(1) == 'G' )
    e = e_saved;
  elseif ( action(1) == 's' || action(1) == 'S' )
    e_saved = e;
  else
    fprintf ( 1, '  E = %d\n', e_saved );
  end

  return
end
