Overview
Comment:Included , in the the list of seperators (SEPS)
This makes it substitute for bits of args separated by commas.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 8be6c3ee23c91c2f9a015d97fd53ba51493fd3ba0e49c0e92af145bfb2ec8cde
User & Date: gawthrop@users.sourceforge.net on 1998-07-27 10:24:20
Other Links: branch diff | manifest | tags
Context
1998-07-27
10:26:02
No change - but fixed bug in alias_args check-in: 11fcfc6a20 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:24:20
Included , in the the list of seperators (SEPS)
This makes it substitute for bits of args separated by commas.
check-in: 8be6c3ee23 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:53:44
No change check-in: 0fd5e62a24 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/alias_args.m from [6cd58d62ce] to [4293bb2400].

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
30
31
32
33
34
35
36
37
38
39
40
41
42
function args = alias_args(args,alias,delim,message)

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



###############################################################


  if is_struct(alias)
    if length(args>0)
      Args = split(args,delim); args="";
      [N,M]= size(Args);
      for i=1:N
        arg = deblank(Args(i,:));
        _arg = strrep(arg,",","__");
        if struct_contains(alias,_arg)
          eval(["new_arg = alias.", _arg,";"]);
  	  mtt_info(["Replacing ", arg, "\t by ",\
		    new_arg, message]);
          arg = new_arg;
        end
        OPS = "+-*/";
        for j = 1:length(OPS)
	  if length(findstr(arg,OPS(j)))>0
	    arg = alias_args(arg,alias,OPS(j),message);
	  end 
	end;
        args = sprintf("%s%s%s", args, delim, arg);
      end
      args = substr(args,2); % loose leading ;
    end
  end;
endfunction;

# " for component ", comp_name,\
#		    " (", comp_type,") within ", full_name]);




|






>
>
>









|
|
|

|


|
|
|
|








<
<
<
<
<
<
<
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
30
31
32
33
34
35
36
37
38







function args = alias_args(args,alias,delim,message,FileID)

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  1998/07/03 18:29:40  peterg
## Initial revision
##
###############################################################


  if is_struct(alias)
    if length(args>0)
      Args = split(args,delim); args="";
      [N,M]= size(Args);
      for i=1:N
        arg = deblank(Args(i,:));
        arg_ = strrep(arg,",","__");
        if struct_contains(alias,arg_)
          eval(["new_arg = alias.", arg_,";"]);
  	  mtt_info(["Replacing ", arg, "\t by ",\
		    new_arg, message],FileID);
          arg = new_arg;
        end
        SEPS = ",+-*/";
        for j = 1:length(SEPS)
	  if length(findstr(arg,SEPS(j)))>0
	    arg = alias_args(arg,alias,SEPS(j),message,FileID);
	  end 
	end;
        args = sprintf("%s%s%s", args, delim, arg);
      end
      args = substr(args,2); % loose leading ;
    end
  end;
endfunction;








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