Differences From Artifact [922774af5e]:

To Artifact [8665903de4]:


1


2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18



19
20
21
22
23
24
25

1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-
+
+








-
+








+
+
+







function args_out = subs_arg(args,Args)
function args_out = subs_arg(args,Args, ...
    default,full_name,comp_type,comp_name,infofile)
% subs_arg - substitutes arguments into args from Args
% FS defaults to `;'.
% 
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%     %%%%% Model Transformation Tools %%%%%
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% Matlab function  subs_arg.m
% args = subs_arg(args,Args)
% args_out = subs_arg(args,Args,default,comp_type,comp_name,infofile)
% Copyright (c) P.J. Gawthrop, 1996.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.2  1996/12/04 21:47:41  peterg
% %% Skips main loop when arg is null.
% %%
% %% Revision 1.1  1996/12/04 21:46:52  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Symbolic argument sign
S = '$';
43
44
45
46
47
48
49









50

51
52
53






47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70
71
72







+
+
+
+
+
+
+
+
+
-
+



+
+
+
+
+
+
	if args_count==L
	  args_count = args_count+1;
	  break
	end;
	args_count = args_count+1;
	ch = str2ch(args,args_count);
      end;
      arg_out = args2arg(Args,i);
      % Test for empty argument -- replace by default and tell user
      if strcmp(arg_out,'')
	info = sprintf("Argument %1.0f of component %s(%s) of system %s is undefined - \n...
	    replacing by %s", i, comp_name, comp_type, full_name, default);
	mtt_info(info,infofile);
	arg_out = default;
      end;
 
      args_out = [args_out, args2arg(Args,i)];
      args_out = [args_out, arg_out];
    end;
  end;
end;







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