diff options
author | Sunil Shetye | 2018-06-25 18:20:39 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-26 11:06:22 +0530 |
commit | 7465daea85285ba7f291b6bf6ddc45caa9e7ad65 (patch) | |
tree | e8e3e4dd60d469c290d55de15644ddbc1e013bc6 /js/Branching/SELECT_m.js | |
parent | 7c70459c10aed0d74ee03896abaf47fefdbf7c8f (diff) | |
download | sci2js-7465daea85285ba7f291b6bf6ddc45caa9e7ad65.tar.gz sci2js-7465daea85285ba7f291b6bf6ddc45caa9e7ad65.tar.bz2 sci2js-7465daea85285ba7f291b6bf6ddc45caa9e7ad65.zip |
add spacing to end of block also
Diffstat (limited to 'js/Branching/SELECT_m.js')
-rw-r--r-- | js/Branching/SELECT_m.js | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/js/Branching/SELECT_m.js b/js/Branching/SELECT_m.js index 90fb26c3..856e759a 100644 --- a/js/Branching/SELECT_m.js +++ b/js/Branching/SELECT_m.js @@ -22,43 +22,44 @@ function SELECT_m() { model.dep_ut = [true,false]; exprs = [[sci2exp(1)],[sci2exp(nin)],[sci2exp(z0)]]; gr_i = []; - x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],model,exprs,gr_i); } SELECT_m.prototype.details = function SELECT_m() { + return this.x; } SELECT_m.prototype.get = function SELECT_m() { } SELECT_m.prototype.set = function SELECT_m() { - x = arg1; + this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,typ,nin,z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ..)"],["number of inputs"],["initial connected input"]],list("vec",1,"vec",1,"vec",1),exprs); - if (!ok) { -break; -} - if (z0>nin||z0<=0) { -message("initial connected input is not a valid input port number"); - } else if (((typ<1)||(typ>8))&&(typ!=-1)) { -message("Datatype is not supported"); - ok = false; - } else { - it = typ*ones(1,nin); - ot = typ; - if (ok) { - in1 = [-ones(nin,1),-2*ones(nin,1)]; - out = [-1,-2]; - [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(nin,1),[]); - if (ok) { - graphics.exprs = exprs; - model.dstate = z0; - x.graphics = graphics; - x.model = model; -break; -} -} -} -} + [ok,typ,nin,z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ..)"],["number of inputs"],["initial connected input"]],list("vec",1,"vec",1,"vec",1),exprs); + if (!ok) { + break; + } + if (z0>nin||z0<=0) { + message("initial connected input is not a valid input port number"); + } else if (((typ<1)||(typ>8))&&(typ!=-1)) { + message("Datatype is not supported"); + ok = false; + } else { + it = typ*ones(1,nin); + ot = typ; + if (ok) { + in1 = [-ones(nin,1),-2*ones(nin,1)]; + out = [-1,-2]; + [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(nin,1),[]); + if (ok) { + graphics.exprs = exprs; + model.dstate = z0; + this.x.graphics = graphics; + this.x.model = model; + break; + } + } + } + } } } |