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/Branching/SCALAR2VECTOR.js | |
parent | 0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff) | |
download | sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2 sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip |
fix assignment to list
Diffstat (limited to 'js/Branching/SCALAR2VECTOR.js')
-rw-r--r-- | js/Branching/SCALAR2VECTOR.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/js/Branching/SCALAR2VECTOR.js b/js/Branching/SCALAR2VECTOR.js index ec798670..004add07 100644 --- a/js/Branching/SCALAR2VECTOR.js +++ b/js/Branching/SCALAR2VECTOR.js @@ -8,8 +8,8 @@ function SCALAR2VECTOR() { this.model.in1 = new ScilabDouble([1]); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; - exprs = [string([this.nout])]; - gr_i = []; + var exprs = [string([this.nout])]; + var gr_i = []; this.x = standard_define([3,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } @@ -25,8 +25,8 @@ function SCALAR2VECTOR() { SCALAR2VECTOR.prototype.set = function SCALAR2VECTOR() { this.nout = parseFloat(arguments[0]["nout"]) 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.nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs); @@ -36,10 +36,13 @@ function SCALAR2VECTOR() { this.nout = int(this.nout); if ((this.nout!=-1&&(this.nout<=0))) { message("size of output must be -1 or >0"); - ok = false; + var ok = false; } if (ok) { - [this.model,graphics,ok] = check_io(this.model,graphics,[1],this.nout,[],[]); + var tmpvar0 = check_io(this.model,graphics,[1],this.nout,[],[]) + this.model = tmpvar0[0] + var graphics = tmpvar0[1] + var ok = tmpvar0[2]; } if (ok) { graphics.exprs = exprs; |