diff options
Diffstat (limited to 'js/Misc/MEMORY_f.js')
-rw-r--r-- | js/Misc/MEMORY_f.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Misc/MEMORY_f.js b/js/Misc/MEMORY_f.js index 53979f34..684e0463 100644 --- a/js/Misc/MEMORY_f.js +++ b/js/Misc/MEMORY_f.js @@ -3,7 +3,7 @@ function MEMORY_f() { MEMORY_f.prototype.define = function MEMORY_f() { var z = 0; var in1 = 1; - var exprs = [[string(z)],[string(1)]]; + this.exprs = [[string(z)],[string(1)]]; this.model = scicos_model(); this.model.sim = new ScilabString(["memo"]); this.model.in1 = new ScilabDouble([in1]); @@ -13,8 +13,8 @@ function MEMORY_f() { this.model.rpar = new ScilabDouble([z]); this.model.blocktype = new ScilabString(["m"]); this.model.dep_ut = new ScilabDouble([false,false]); - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MEMORY_f\",sz(1),sz(2));"]); - this.x = standard_define([2,2],this.model,exprs,gr_i); + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MEMORY_f\",sz(1),sz(2));"]); + this.x = standard_define([2,2],this.model,this.exprs,this.gr_i); return new BasicBlock(this.x); } MEMORY_f.prototype.details = function MEMORY_f() { @@ -30,12 +30,13 @@ function MEMORY_f() { MEMORY_f.prototype.set = function MEMORY_f() { this.a = arguments[0]["a"] this.inh = parseFloat(arguments[0]["inh"]) + this.exprs = arguments[0]["exprs"] this.x = arg1; this.graphics = arg1.graphics; - var exprs = this.graphics.exprs; + this.exprs = this.graphics.exprs; this.model = arg1.model; while (true) { - [ok,this.a,this.inh,exprs] = scicos_getvalue("Set memory block parameters",["initial condition","Inherit (1: no, 0: yes)"],list("vec",-1,"vec",1),exprs); + [ok,this.a,this.inh,this.exprs] = scicos_getvalue("Set memory block parameters",["initial condition","Inherit (1: no, 0: yes)"],list("vec",-1,"vec",1),this.exprs); if (!ok) { break; } @@ -55,7 +56,7 @@ function MEMORY_f() { } var in1 = out; if (ok) { - this.graphics.exprs = new ScilabDouble([exprs]); + this.graphics.exprs = new ScilabDouble([this.exprs]); this.model.rpar = new ScilabDouble([this.a]); this.model.in1 = new ScilabDouble([in1]); this.model.out = new ScilabDouble([out]); |