From 3386d0d537a498adce65f313aacb7ca4a147a4d2 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Fri, 24 Aug 2018 11:46:02 +0530 Subject: remove exprs and gr_i from default global list --- js/Electrical/NMOS.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/Electrical/NMOS.js') diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js index 1c876dcb..c6d59869 100644 --- a/js/Electrical/NMOS.js +++ b/js/Electrical/NMOS.js @@ -22,9 +22,9 @@ function NMOS() { this.model.equations = new ScilabDouble([mo]); this.model.in = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); - this.exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]]; - this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"NMOS\",sz(1),sz(2));"]); - this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble(this.exprs),this.gr_i); + var exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]]; + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"NMOS\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble(exprs),gr_i); this.x.graphics.in_implicit = ["I"]; this.x.graphics.out_implicit = [["I"],["I"],["I"]]; return new BasicBlock(this.x); @@ -47,7 +47,7 @@ function NMOS() { return options; } NMOS.prototype.set = function NMOS() { - this.exprs = this.graphics.exprs; + var exprs = this.graphics.exprs; while (true) { var ok = true; this.W = parseFloat(arguments[0]["W"]); @@ -63,7 +63,7 @@ function NMOS() { break; } this.model.equations.parameters[2-1] = list(new ScilabDouble([this.W]), new ScilabDouble([this.L]), new ScilabDouble([this.Beta]), new ScilabDouble([this.Vt]), new ScilabDouble([this.K2]), new ScilabDouble([this.K5]), new ScilabDouble([this.dW]), new ScilabDouble([this.dL]), new ScilabDouble([this.RDS])); - this.graphics.exprs = new ScilabDouble([this.exprs]); + this.graphics.exprs = new ScilabDouble([exprs]); this.x.graphics = this.graphics; this.x.model = this.model; break; -- cgit