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
|
## ###############################################################
## ## Version control history
## ###############################################################
## ## $Id$
## ## $Log$
## ## Revision 1.1 1998/07/25 09:47:43 peterg
## ## Initial revision
## ##
## ###############################################################
if nargin<7
eqnfile = "stdout";
endif
## Find the number of ports
ports = length(RHS_cause);
## Print the CR
if length(cr) == 0 # No CR given - use unity CR
fprintf(eqnfile, "%s;\n", varname(name,bond_number(outport), \
RHS_cause(outport)));
else # CR exists
fprintf(eqnfile, "%s(%s", cr, name); # The CR name and component type
if ports>1 # Multi ports - port no. is first arg of CR
fprintf(eqnfile, "#1.0f,", outport);
endif
fprintf(eqnfile, "%s", args); # Print the arguments
|
>
>
>
|
|
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
43
44
|
## ###############################################################
## ## Version control history
## ###############################################################
## ## $Id$
## ## $Log$
## ## Revision 1.2 2003/01/07 09:11:53 gawthrop
## ## Octavised
## ##
## ## Revision 1.1 1998/07/25 09:47:43 peterg
## ## Initial revision
## ##
## ###############################################################
if nargin<7
eqnfile = "stdout";
endif
## Find the number of ports
ports = length(RHS_cause);
## Print the CR
if length(cr) == 0 # No CR given - use unity CR
fprintf(eqnfile, "%s;\n", varname(name,bond_number(outport), ...
RHS_cause(outport)));
else # CR exists
fprintf(eqnfile, "%s(%s", cr, name); # The CR name and component type
if ports>1 # Multi ports - port no. is first arg of CR
fprintf(eqnfile, "#1.0f,", outport);
endif
fprintf(eqnfile, "%s", args); # Print the arguments
|