Index: mttroot/mtt/bin/trans/m/cbg2ese.m ================================================================== --- mttroot/mtt/bin/trans/m/cbg2ese.m +++ mttroot/mtt/bin/trans/m/cbg2ese.m @@ -21,10 +21,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.18 1998/04/11 18:59:16 peterg +% %% at_top_level now global - passed to SS components +% %% % %% Revision 1.17 1998/04/04 10:47:31 peterg % %% Uses (coerced) components from _cbg file - _abg not now used here. % %% % %% Revision 1.16 1998/03/06 09:38:58 peterg % %% Now writes correct structure file for multiport C & I @@ -260,21 +263,29 @@ disp('---POP---'); else % its a simple component fprintf(ese_file, '\n\t%s Equations for component %s (%s), repetition %d\n\n', ... pc, comp_name, comp_type,k); - % Take port SS to be ordinary SS at top level - if at_top_level & strcmp(comp_type, 'SS') - effort_attribute = cr; - flow_attribute = args; - if strcmp(effort_attribute, 'MTT_port') % Its a numbered port - effort_attribute = 'external'; - flow_attribute = 'external'; - cr = effort_attribute; - args = flow_attribute; - end; - end; + + % Is it a named port? (Name begins with [) + Named_Port = (comp_name(1)=='['); + + if Named_Port %Add [ to start of name + name_r = ['[' name_r]; + end; + +# % Take port SS to be ordinary SS at top level +# if at_top_level & strcmp(comp_type, 'SS') +# effort_attribute = cr; +# flow_attribute = args; +# if strcmp(effort_attribute, 'MTT_port') % Its a numbered port +# effort_attribute = 'external'; +# flow_attribute = 'external'; +# cr = effort_attribute; +# args = flow_attribute; +# end; +# end; % Save the current structure old_structure = structure; % Generate the simple component equations