function curblock=gcb(sys)
%GCB	Get current block.
%	B = GCB returns the name to the current block in a SIMULINK
%	model.  The current block is the most recent block within the
%	current system that was clicked in.  In addition, while a
%	simulation is running, S-Function blocks are the current block
%	while they are being evaluated.
%
%	See also GET_PARAM.

%	Copyright (c) 1984-94 by The MathWorks, Inc.
%	Rick Spada  12-10-93

if nargin < 1,
  [cs,cb] = get_param;
else
  [cs,cb] = get_param(sys);
end

if isempty(cs)
  curblock = [];
else
  curblock = [cs '/' cb];
end
