Overview
Comment:Alias CRs (as well ars args)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 12abc6a06af179713cf93333112de50d5d55ca8a7ecf2c73c55aadb0ac31eaee
User & Date: gawthrop@users.sourceforge.net on 2003-03-24 12:19:47
Other Links: branch diff | manifest | tags
Context
2003-03-24
12:20:28
*** empty log message *** check-in: 832b30881b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
12:19:47
Alias CRs (as well ars args) check-in: 12abc6a06a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
12:18:00
Default file when no second argument check-in: 742bd32c68 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/mtt_component_eqn.m from [8b9c8b7608] to [5401ff46ff].

21
22
23
24
25
26
27

28
29
30
31
32
33
34
  ## 

  [Name,name] = mtt_subname(fullname); # Split fullname

  SD = "__";			# Subsystem delimiter
  CD = "\n%%";			# Comment delimiter
  arg_default = "1";		# Default aliased arg


  DEBUG = 0;

  if DEBUG
    disp("=======================================");
    fullname, name, Name, port,causality,known
  endif







>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  ## 

  [Name,name] = mtt_subname(fullname); # Split fullname

  SD = "__";			# Subsystem delimiter
  CD = "\n%%";			# Comment delimiter
  arg_default = "1";		# Default aliased arg
  cr_default = "lin";		# Default aliased arg

  DEBUG = 0;

  if DEBUG
    disp("=======================================");
    fullname, name, Name, port,causality,known
  endif
47
48
49
50
51
52
53

54
55
56




57
58
59
60
61
62
63
	eval(sprintf("cbg.subsystems.%s=cbg.ports.%s;",component,component));
      endfor
    endif
  endif


  if length(name)>0 		# Alias

    eval(sprintf("ARG=cbg.subsystems.%s.arg;", name)); # Arguments
    ARG = mtt_alias (Name,ARG,arg_default); # Alias them
    eval(sprintf("cbg.subsystems.%s.arg=ARG;", name)); # and copy




  else			  # Call to a subsystem (represented by name="")
    if !struct_contains(cbg,"portlist")
      N_ports = 0;
    else
      [N_ports,M_ports] = size(cbg.portlist);
    endif
    







>



>
>
>
>







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
	eval(sprintf("cbg.subsystems.%s=cbg.ports.%s;",component,component));
      endfor
    endif
  endif


  if length(name)>0 		# Alias
    ##Alias arguments
    eval(sprintf("ARG=cbg.subsystems.%s.arg;", name)); # Arguments
    ARG = mtt_alias (Name,ARG,arg_default); # Alias them
    eval(sprintf("cbg.subsystems.%s.arg=ARG;", name)); # and copy
    ## Alias CRs
    eval(sprintf("CR=cbg.subsystems.%s.cr;", name)); # CRs
    CR = mtt_alias (Name,CR,cr_default); # Alias them
    eval(sprintf("cbg.subsystems.%s.cr=CR;", name)); # and copy
  else			  # Call to a subsystem (represented by name="")
    if !struct_contains(cbg,"portlist")
      N_ports = 0;
    else
      [N_ports,M_ports] = size(cbg.portlist);
    endif
    


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