summaryrefslogtreecommitdiff
path: root/js/Electrical/Diode.js
diff options
context:
space:
mode:
authorSunil Shetye2018-08-24 11:46:02 +0530
committerSunil Shetye2018-08-27 16:43:40 +0530
commit3386d0d537a498adce65f313aacb7ca4a147a4d2 (patch)
treedc8b98c70c10cec2c9f3f37b5858e1afd6554698 /js/Electrical/Diode.js
parent9fee9bd7e5e356e872c7a539d4a6cfa89cae593c (diff)
downloadsci2js-3386d0d537a498adce65f313aacb7ca4a147a4d2.tar.gz
sci2js-3386d0d537a498adce65f313aacb7ca4a147a4d2.tar.bz2
sci2js-3386d0d537a498adce65f313aacb7ca4a147a4d2.zip
remove exprs and gr_i from default global list
Diffstat (limited to 'js/Electrical/Diode.js')
-rw-r--r--js/Electrical/Diode.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js
index 4fd8353f..36080edd 100644
--- a/js/Electrical/Diode.js
+++ b/js/Electrical/Diode.js
@@ -18,9 +18,9 @@ function Diode() {
mo.outputs = "n";
mo.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R));
this.model.equations = new ScilabDouble([mo]);
- this.exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
- this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Diode\",sz(1),sz(2));"]);
- this.x = new standard_define(new ScilabDouble([2,1]),this.model,new ScilabString([this.exprs]),list(this.gr_i,0));
+ var exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Diode\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2,1]),this.model,new ScilabString([exprs]),list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
return new BasicBlock(this.x);
@@ -38,7 +38,7 @@ function Diode() {
return options;
}
Diode.prototype.set = function Diode() {
- this.exprs = this.graphics.exprs;
+ var exprs = this.graphics.exprs;
while (true) {
var ok = true;
this.Ids = parseFloat(arguments[0]["Ids"]);
@@ -50,7 +50,7 @@ function Diode() {
}
this.model.rpar = new ScilabDouble([this.Ids],[this.Vt],[this.Maxexp],[this.R]);
this.model.equations.parameters = list(new ScilabDouble([["Ids","Vt","Maxexp","R"]]),list(this.Ids,this.Vt,this.Maxexp,this.R));
- this.graphics.exprs = new ScilabDouble([this.exprs]);
+ this.graphics.exprs = new ScilabDouble([exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;