Differences From Artifact [6dfb5b2a2f]:

To Artifact [693178b62c]:


27
28
29
30
31
32
33



34
35
36
37
38
39
40
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43







+
+
+








			
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.25  2003/01/07 18:09:21  geraint
% %% More informative error message.
% %%
% %% Revision 1.24  1999/10/22 02:20:32  peterg
% %% Changed error handleing of number of attributes >2
% %%
% %% Revision 1.23  1998/12/03 16:46:16  peterg
% %% Deblanked attributes so that zero attribute works.
% %%
% %% Revision 1.22  1998/07/28 19:05:46  peterg
207
208
209
210
211
212
213
214

215
216
217
218
219
220
221
210
211
212
213
214
215
216

217
218
219
220
221
222
223
224







-
+







    else 
      if bonds(1,1)==-1 % Named or unknown source
	fprintf(filenum, "%s := %s;\n", ...
		varname(sname, bond_number,1), effort_attribute);
      else % Sensor
	if strcmp(effort_attribute, "zero") %Zero output
	  zero_outputs = zero_outputs + 1;
	  fprintf(filenum, "MTTyz%d := %s;\n", ...
	  fprintf(filenum, "MTTyz(%d,1) := %s;\n", ...
		  zero_outputs, varname(sname, bond_number,1));
	else
	  mtt_error([effort_attribute, " not appropriate for an output (", name, ")"]);
	end;
      end;
    end;
    
238
239
240
241
242
243
244
245

246
247
248
249
250
251
252
253
254
255
256
257
258
241
242
243
244
245
246
247

248
249
250
251
252
253
254
255
256
257
258
259
260
261







-
+













    else % Named constant
      if bonds(1,2)==1 % Source
	fprintf(filenum, "%s := %s;\n", ...
		varname(sname, bond_number,-1), flow_attribute);
      else % Sensor
	if strcmp(flow_attribute, "zero") %Zero output
	  zero_outputs = zero_outputs + 1
	  fprintf(filenum, "MTTyz%d := %s;\n", ...
	  fprintf(filenum, "MTTyz(%d,1) := %s;\n", ...
		  zero_outputs, varname(sname, bond_number,-1));
	else
	  mtt_error([flow_attribute, " not appropriate for an output (", name, ")"]);
	end;
      end;
    end;
  end;
  structure(3) = inputs;
  structure(4) = outputs;
  structure(5) = zero_outputs;
  structure(6) = unknown_inputs;
  
end;

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