function INLINE_OUT_ = feval(varargin)
%FEVAL  FEVAL an INLINE object.

%   Steven L. Eddins, August 1995
%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.11 $  $Date: 1997/11/21 23:30:31 $

INLINE_OBJ_ = varargin{1};
INLINE_INPUTS_ = varargin(2:end);

if ischar(INLINE_OBJ_)
  % If any of the elements in varargin are inline objects, then the
  %  overloaded inline feval is called even if the first argument
  %  is a string.  In this case, we call the builtin feval.
  INLINE_OUT_ = builtin('feval',varargin{:});
else

  if (length(INLINE_INPUTS_) < INLINE_OBJ_.numArgs)
    error('Not enough inputs to inline function.');
  elseif (length(INLINE_INPUTS_) > INLINE_OBJ_.numArgs)
    error('Too many inputs to inline function.');
  end

  if (isempty(INLINE_OBJ_.expr))
    INLINE_OUT_ = [];
  else
    eval(INLINE_OBJ_.inputExpr);
    INLINE_OBJ_catch = ['error(sprintf(''Error in inline expression',...
                        ' ==> %s\n??? %s'',INLINE_OBJ_.expr,lasterr))'];
    INLINE_OUT_ = eval(INLINE_OBJ_.expr,INLINE_OBJ_catch);
  end
  
end






