function [stat,post] = blkdecode(path,prop,bstr,bint,bflt,parent,name)
%BLKDECODE Converts a decimal number to its binary representation.
%
%  See also BLKENCODE.

% Initial coding by A S Bozin, 1-4-98
% Copyright 1997-2000 The MathWorks, Inc.
% $Revision: 1.4 $ $Date: 2000/06/14 16:09:01 $

   stat = 0;					   % Error flag
   nInputs = bint(5);
   nOutputs = bint(6);
   nStates = bint(7);
   %
   % Add mux and demux blocks if necessary
   %
   [post,rect] = blkio('port',nInputs,nOutputs,prop,path);
   %
   % Get the parameters
   %
   indInt = bint(15)+1;
   mode = bint(indInt);
   indInt = bint(18);
   indFlt = bint(19);
   indInt = bint(indInt+1)+indInt;
   str = cell(3,1);				   % To hold parameters
   pRange = 1:nInputs;
   str{1} = mat2char(bint(indInt+pRange));	   % Bits per output channel
   str{2} = mat2char(bflt(indFlt+pRange));	   % Output minimum
   indFlt = indFlt+nInputs;
   str{3} = mat2char(bflt(indFlt+pRange));	   % Output maximum
   %
   % Decoder block
   %
   bh = add_block('libsb2sl/LOG/Decoder',path,...
		  'ForegroundColor',prop.fgColor,...
		  'BackgroundColor',prop.bgColor,...
		  'Orientation',prop.orientation,...
		  'DropShadow',prop.border,...
		  'Position',rect,...
		  'BPI',str{1},...
		  'MIN',str{2},...
		  'MAX',str{3});
   %
   % Connect the current decoder block with the mux and demux blocks
   %
   blkio('line',nInputs,nOutputs,post,parent,name);
   return					   % Last card of BLKDECODE
