summaryrefslogtreecommitdiff
path: root/js/Branching/ISELECT_f.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Branching/ISELECT_f.js')
-rw-r--r--js/Branching/ISELECT_f.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/js/Branching/ISELECT_f.js b/js/Branching/ISELECT_f.js
index dec270a2..1d953eed 100644
--- a/js/Branching/ISELECT_f.js
+++ b/js/Branching/ISELECT_f.js
@@ -4,17 +4,17 @@ function ISELECT_f() {
this.z0 = 0;
out = [[-1],[-1]];
this.nout = 2;
- model = scicos_model();
- model.sim = list("selector",2);
- model.in1 = -1;
- model.out = out;
- model.evtin = ones(out);
- model.dstate = this.z0;
- model.blocktype = "c";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("selector",2);
+ this.model.in1 = new ScilabDouble(-1);
+ this.model.out = out;
+ this.model.evtin = new ScilabDouble(ones(out));
+ this.model.dstate = new ScilabDouble(this.z0);
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
exprs = [[string(this.nout)],[string(this.z0+1)]];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
ISELECT_f.prototype.details = function ISELECT_f() {
@@ -33,7 +33,7 @@ function ISELECT_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.nout,this.z0,exprs] = scicos_getvalue("Set parameters",["number of outputs","initial connected output"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -42,12 +42,12 @@ function ISELECT_f() {
if (this.z0>this.nout||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-1,-ones(this.nout,1),ones(this.nout,1),[]);
+ [model,graphics,ok] = check_io(this.model,graphics,-1,-ones(this.nout,1),ones(this.nout,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = this.z0-1;
+ this.model.dstate = new ScilabDouble(this.z0-1);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}