1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function write_abg(system_name,bonds,connections);
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.4 1998/08/26 12:45:38 peterg
## Just prefix ports (comps can't start with numeral)
## Prefix with mttp
##
## Revision 1.3 1998/08/26 12:31:07 peterg
## numerical names prefixed by mtt
##
|
>
>
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
function write_abg(system_name,bonds,connections);
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.5 1998/09/02 10:30:30 peterg
## Now writes out list of ports ans list of subsystems.
## These ordereded lists determine the order of processing of ports ans
## subsystems.
##
## Revision 1.4 1998/08/26 12:45:38 peterg
## Just prefix ports (comps can't start with numeral)
## Prefix with mttp
##
## Revision 1.3 1998/08/26 12:31:07 peterg
## numerical names prefixed by mtt
##
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
ch=name(1); # First char of name
if (ch>="0")&&(ch<="9") # Its a numeral
name=["mttp",name]; # prefix by mttp
endif;
PortList = [PortList; name];
fprintf(fid,"\n# Port %s\n", name);
fprintf(fid,PIformat,system_name,name,"index",++i_port);
fprintf(fid,PSformat,system_name,name,"type",comp_type);
fprintf(fid,PSformat,system_name,name,"cr",cr);
fprintf(fid,PSformat,system_name,name,"arg",arg);
fprintf(fid,PIformat,system_name,name,"repetitions",repetitions);
c = nozeros(connections(i,:));# Connections to this component
m = length(c); # Number of connections
|
|
|
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
ch=name(1); # First char of name
if (ch>="0")&&(ch<="9") # Its a numeral
name=["mttp",name]; # prefix by mttp
endif;
PortList = [PortList; name];
fprintf(fid,"\n# Port %s\n", name);
# fprintf(fid,PIformat,system_name,name,"index",++i_port);
fprintf(fid,PSformat,system_name,name,"type",comp_type);
fprintf(fid,PSformat,system_name,name,"cr",cr);
fprintf(fid,PSformat,system_name,name,"arg",arg);
fprintf(fid,PIformat,system_name,name,"repetitions",repetitions);
c = nozeros(connections(i,:));# Connections to this component
m = length(c); # Number of connections
|