summaryrefslogtreecommitdiff
path: root/js/Misc/func_block.js
diff options
context:
space:
mode:
authorSunil Shetye2018-07-11 13:05:13 +0530
committerSunil Shetye2018-07-11 15:21:08 +0530
commit079d0b4a3ec15a4d7d2644484d116df9d1c694bb (patch)
tree785ed59b5b238203a9e91f3e323da59d1083d86e /js/Misc/func_block.js
parent0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff)
downloadsci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip
fix assignment to list
Diffstat (limited to 'js/Misc/func_block.js')
-rw-r--r--js/Misc/func_block.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/js/Misc/func_block.js b/js/Misc/func_block.js
index 52a8a30a..2579f2c7 100644
--- a/js/Misc/func_block.js
+++ b/js/Misc/func_block.js
@@ -7,8 +7,8 @@ function func_block() {
this.model.out = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = "v=sin(u);y=u*v";
- gr_i = [];
+ var exprs = "v=sin(u);y=u*v";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -22,11 +22,14 @@ function func_block() {
}
func_block.prototype.set = function func_block() {
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.x = arg1;
this.model = this.x.model;
- [ok,mac,exprs] = this.genfunc[exprs-1];
+ var tmpvar0 = genfunc(exprs)
+ var ok = tmpvar0[0]
+ var mac = tmpvar0[1]
+ var exprs = tmpvar0[2];
if (ok) {
this.model.sim = new ScilabDouble([mac]);
graphics.exprs = exprs;