function result = isppc
%ISPPC True for Macintosh PowerPC.
%   ISPPC returns 1 if this computer is a Macintosh PowerPC
%   and 0 otherwise.
%
%   ISPPC uses GESTALT to determine if the PPC bit is turned
%   on or off

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.5 $ $Date: 1997/11/21 23:32:01 $

if ~strncmp(computer,'MA',2)
  result = logical(0);
  return
end

% make a call to the MEX-File that call the Gestalt MAC OS fcn
% we can't check if the gestalt MEX-File exists so we're doing a
% try-catch  
eval('bit_stream=gestalt(''sysa'');','error(''Gestalt MEX-File not found.'')');

% if this is a PPC, the 31st bit is on;
% if this is a 68k, the 32nd bit is on;
result=logical(bit_stream(31));

