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/Sinks/TOWS_c.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/Sinks/TOWS_c.js') diff --git a/js/Sinks/TOWS_c.js b/js/Sinks/TOWS_c.js index 0f285c96..f07c35d0 100644 --- a/js/Sinks/TOWS_c.js +++ b/js/Sinks/TOWS_c.js @@ -18,9 +18,9 @@ function TOWS_c() { this.model.blocktype = new ScilabString(["d"]); this.model.firing = new ScilabDouble([]); this.model.dep_ut = new ScilabBoolean([false,false]); - this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TOWS_c\",sz(1),sz(2));"]); - this.exprs = [[string(this.nz)],[string(this.varnam)],[string(this.herit)]]; - this.x = new standard_define(new ScilabDouble([4,2]),this.model,new ScilabDouble(this.exprs),this.gr_i); + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TOWS_c\",sz(1),sz(2));"]); + var exprs = [[string(this.nz)],[string(this.varnam)],[string(this.herit)]]; + this.x = new standard_define(new ScilabDouble([4,2]),this.model,new ScilabDouble(exprs),gr_i); return new BasicBlock(this.x); } TOWS_c.prototype.details = function TOWS_c() { @@ -35,7 +35,7 @@ function TOWS_c() { return options; } TOWS_c.prototype.set = function TOWS_c() { - this.exprs = this.graphics.exprs; + var exprs = this.graphics.exprs; while (true) { var ok = true; this.nz = parseFloat(arguments[0]["nz"]); @@ -68,7 +68,7 @@ function TOWS_c() { this.model.blocktype = new ScilabString(["d"]); } this.model.ipar = new ScilabDouble([this.nz],[length(this.varnam)],[transpose(this.ascii[this.varnam-1])]); - 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