Overview
Comment:Added more error info.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: a72ecada3c5378f909ac5343d9257399f149ef07b91688a44472e0c6930962ba
User & Date: gawthrop@users.sourceforge.net on 1997-03-17 13:45:42
Other Links: branch diff | manifest | tags
Context
1997-03-18
13:55:01
Initial revision check-in: e415b2b0e9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1997-03-17
13:45:42
Added more error info. check-in: a72ecada3c user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1997-03-10
09:24:58
a.out now deleted in the clean operation check-in: 2241dd8a8f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/rbg2abg.m from [b0a94e0639] to [3130b73565].

1
2
3
4
5
6
7



8
9
10
11
12
13
14
function [bonds,components] = rbg2abg(rbonds,rstrokes,rcomponents,rports,infofile)

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.8  1996/12/04 21:52:39  peterg
% %% Now uses fopen.
% %%
% %% Revision 1.7  1996/11/01 18:01:57  peterg
% %% Rationalised port ordering.
% %% Fixed port bug.
% %%







>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function [bonds,components] = rbg2abg(rbonds,rstrokes,rcomponents,rports,infofile)

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.9  1996/12/31  11:25:57  peterg
% %% Clearer error messages for incorrect ports.
% %%
% %% Revision 1.8  1996/12/04 21:52:39  peterg
% %% Now uses fopen.
% %%
% %% Revision 1.7  1996/11/01 18:01:57  peterg
% %% Rationalised port ordering.
% %% Fixed port bug.
% %%
133
134
135
136
137
138
139





140
141
142
143
144
145
146
	[sorted,sort_index]=sort(port_number);
	
	%Check that all the numbers (1..n) are there
	if sum(sorted==[1:n]')~=n % There is something wrong
	  mtt_info(port_error,fnum);
	  mtt_info(sprintf('\t it must have consecutive ports labels from 1:%1.0f\n', n), ...
	      fnum);





	end;
      else
	if k~=0
	  mtt_info(port_error,fnum);
	  mtt_info(sprintf('\t it must have 0 or %1.0f ports\n', n), fnum);
	  port_str = sprintf('\t the port labels are: ');
	  for kk=1:k







>
>
>
>
>







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
	[sorted,sort_index]=sort(port_number);
	
	%Check that all the numbers (1..n) are there
	if sum(sorted==[1:n]')~=n % There is something wrong
	  mtt_info(port_error,fnum);
	  mtt_info(sprintf('\t it must have consecutive ports labels from 1:%1.0f\n', n), ...
	      fnum);
	  port_str = sprintf('\t the port labels are: ');
	  for kk=1:k
	    port_str=sprintf('%s %1.0f', port_str, port_number(kk));
	  end;
	  mtt_info(port_str, fnum);
	end;
      else
	if k~=0
	  mtt_info(port_error,fnum);
	  mtt_info(sprintf('\t it must have 0 or %1.0f ports\n', n), fnum);
	  port_str = sprintf('\t the port labels are: ');
	  for kk=1:k


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]