Index: mttroot/mtt/lib/comp/simple/SS_eqn.m ================================================================== --- mttroot/mtt/lib/comp/simple/SS_eqn.m +++ mttroot/mtt/lib/comp/simple/SS_eqn.m @@ -26,10 +26,15 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.16 1998/04/11 19:07:16 peterg +% %% Now do named ports as ordinary ports iff at top level. +% %% --- not yet complete, need to pass necesssary info though to this +% %% function +% %% % %% Revision 1.15 1997/12/16 19:16:07 peterg % %% Added unknown input to the effort part. % %% % %% Revision 1.14 1997/12/16 18:25:19 peterg % %% Added unknown_input attribure to flow -- effort still needs doing @@ -92,10 +97,11 @@ STDerr = 2; % Standard output effort_attribute = cr; flow_attribute = args; +% Default attributes if strcmp(effort_attribute,'') effort_attribute = 'external'; end; if strcmp(flow_attribute,'') @@ -106,11 +112,19 @@ inputs = structure(3); outputs = structure(4); zero_outputs = structure(5); unknown_inputs = structure(6); -if strcmp(effort_attribute, 'MTT_port')&&~at_top_level % It's a named port +% Is it a named port? (Name begins with [) +Named_Port = (name(1)=='['); + +if Named_Port + % Strip the [ + name = name(2:length(name)); +end; + +if Named_Port&&~at_top_level % It's a named port % Note: we don't have numbered ports now, so the correct indices are deduced % by incrementing the two globals: local_u_index and local_y_index % $$$ % Convert string to number % $$$ % port_number = abs(flow_attribute)-abs('0');