summaryrefslogtreecommitdiff
path: root/js/Branching/SWITCH2_m.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/Branching/SWITCH2_m.js
parent0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff)
downloadsci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip
fix assignment to list
Diffstat (limited to 'js/Branching/SWITCH2_m.js')
-rw-r--r--js/Branching/SWITCH2_m.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/js/Branching/SWITCH2_m.js b/js/Branching/SWITCH2_m.js
index 8dbaa1e6..e49aa38c 100644
--- a/js/Branching/SWITCH2_m.js
+++ b/js/Branching/SWITCH2_m.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/Branching/SWITCH2_m.sci" */
function SWITCH2_m() {
SWITCH2_m.prototype.define = function SWITCH2_m() {
- ipar = [0];
+ var ipar = [0];
this.nzz = 1;
- rpar = 0;
+ var rpar = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["switch2_m"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1],[1],[-1]);
@@ -18,8 +18,8 @@ function SWITCH2_m() {
this.model.nmode = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function SWITCH2_m() {
this.thra = arguments[0]["thra"]
this.nzz = parseFloat(arguments[0]["nzz"])
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.ot,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",["Datatype (1=real double 2=complex 3=int32 ...)","pass first input if: u2>=a (0), u2>a (1), u2~=a (2)","threshold a","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -68,15 +68,18 @@ function SWITCH2_m() {
}
if (((this.ot<1)||(this.ot>8))&&(this.ot!=-1)) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
it[1-1] = this.ot;
it[2-1] = 1;
it[3-1] = this.ot;
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,this.ot),[],[]);
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,this.ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.x.graphics = graphics;