Index: mttroot/mtt/bin/trans/m/subs_arg.m ================================================================== --- mttroot/mtt/bin/trans/m/subs_arg.m +++ mttroot/mtt/bin/trans/m/subs_arg.m @@ -1,7 +1,7 @@ function args_out = subs_arg(args,Args, ... - default,full_name,comp_type,comp_name,infofile) + default,full_name,comp_type,comp_name,fileID) % subs_arg - substitutes arguments into args from Args % FS defaults to `;'. % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%% Model Transformation Tools %%%%% @@ -15,10 +15,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.4 1996/12/10 16:04:11 peterg +% %% Changed file handling on mtt_info. +% %% % %% Revision 1.3 1996/12/07 18:19:39 peterg % %% Replaces null argument by a default and tells user. % %% % %% Revision 1.2 1996/12/04 21:47:41 peterg % %% Skips main loop when arg is null. @@ -53,20 +56,22 @@ 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 - format = 'Argument %1.0f of component %s(%s) of system %s is undefined - \n replacing by %s'; + message = 'Argument %1.0f of component %s(%s) of system %s is undefined - \n replacing by %s'; if strcmp(arg_out,'') - info = sprintf(format, ... + info = sprintf(message, ... i, comp_name, comp_type, full_name, default); - mtt_info(info,infofile); arg_out = default; + else + info = sprintf("Replacing $%i \t by %s for component %s (%s) \ + within %s", i, arg_out, comp_name, comp_type, full_name); end; - + mtt_info(info,fileID); args_out = [args_out, arg_out]; end; end; end;