diff options
author | Sunil Shetye | 2018-07-11 13:05:13 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-11 15:21:08 +0530 |
commit | 079d0b4a3ec15a4d7d2644484d116df9d1c694bb (patch) | |
tree | 785ed59b5b238203a9e91f3e323da59d1083d86e /js/Misc/MEMORY_f.js | |
parent | 0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff) | |
download | sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2 sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip |
fix assignment to list
Diffstat (limited to 'js/Misc/MEMORY_f.js')
-rw-r--r-- | js/Misc/MEMORY_f.js | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/js/Misc/MEMORY_f.js b/js/Misc/MEMORY_f.js index c410b3c2..d975cc56 100644 --- a/js/Misc/MEMORY_f.js +++ b/js/Misc/MEMORY_f.js @@ -1,9 +1,9 @@ /* autogenerated from "macros/Misc/MEMORY_f.sci" */ function MEMORY_f() { MEMORY_f.prototype.define = function MEMORY_f() { - z = 0; - in1 = 1; - exprs = [[string(z)],[string(1)]]; + var z = 0; + var in1 = 1; + var exprs = [[string(z)],[string(1)]]; this.model = scicos_model(); this.model.sim = new ScilabString(["memo"]); this.model.in1 = new ScilabDouble([in1]); @@ -13,7 +13,7 @@ function MEMORY_f() { this.model.rpar = new ScilabDouble([z]); this.model.blocktype = new ScilabString(["m"]); this.model.dep_ut = [false,false]; - gr_i = []; + var gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } @@ -31,8 +31,8 @@ function MEMORY_f() { this.a = arguments[0]["a"] this.inh = parseFloat(arguments[0]["inh"]) this.x = arg1; - graphics = arg1.graphics; - exprs = graphics.exprs; + var graphics = arg1.graphics; + var exprs = 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); @@ -44,13 +44,16 @@ function MEMORY_f() { } else { this.inh = 1; } - [this.model,graphics,ok] = check_io(this.model,graphics,-1,-1,this.inh,[]); - out = size(this.a,"*"); + var tmpvar0 = check_io(this.model,graphics,-1,-1,this.inh,[]) + this.model = tmpvar0[0] + var graphics = tmpvar0[1] + var ok = tmpvar0[2]; + var out = size(this.a,"*"); if (out==0) { - ok = false; + var ok = false; messagebox("Initial condition empty","modal","error"); } - in1 = out; + var in1 = out; if (ok) { graphics.exprs = exprs; this.model.rpar = new ScilabDouble([this.a]); |