summaryrefslogtreecommitdiff
path: root/js/Branching/SELECT_f.js
diff options
context:
space:
mode:
authorSunil Shetye2018-07-09 11:43:39 +0530
committerSunil Shetye2018-07-09 12:16:25 +0530
commit62b1d7dd9183ed75733b44104890586b03818214 (patch)
tree9859e9ca295df98df945bd5fcccc3a264e8bede1 /js/Branching/SELECT_f.js
parent5c011853630a1b466ef4789d5b600dd530d0a3ec (diff)
downloadsci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz
sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2
sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Branching/SELECT_f.js')
-rw-r--r--js/Branching/SELECT_f.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/js/Branching/SELECT_f.js b/js/Branching/SELECT_f.js
index 4fc32b71..9ccb7401 100644
--- a/js/Branching/SELECT_f.js
+++ b/js/Branching/SELECT_f.js
@@ -4,17 +4,17 @@ function SELECT_f() {
this.z0 = 0;
in1 = [[-1],[-1]];
this.nin = 2;
- model = scicos_model();
- model.sim = list("selector",2);
- model.in1 = in1;
- model.out = -1;
- model.evtin = ones(in1);
- 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 = in1;
+ this.model.out = new ScilabDouble(-1);
+ this.model.evtin = new ScilabDouble(ones(in1));
+ this.model.dstate = new ScilabDouble(this.z0);
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
exprs = [[string(this.nin)],[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);
}
SELECT_f.prototype.details = function SELECT_f() {
@@ -33,7 +33,7 @@ function SELECT_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",["number of inputs","initial connected input"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -42,12 +42,12 @@ function SELECT_f() {
if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]);
+ [model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,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;
}
}