diff options
Diffstat (limited to 'js/Branching/SCALAR2VECTOR.js')
-rw-r--r-- | js/Branching/SCALAR2VECTOR.js | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/js/Branching/SCALAR2VECTOR.js b/js/Branching/SCALAR2VECTOR.js index 867ef489..a1f50ede 100644 --- a/js/Branching/SCALAR2VECTOR.js +++ b/js/Branching/SCALAR2VECTOR.js @@ -10,36 +10,37 @@ function SCALAR2VECTOR() { model.dep_ut = [true,false]; exprs = [string([nout])]; gr_i = []; - x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],model,exprs,gr_i); } SCALAR2VECTOR.prototype.details = function SCALAR2VECTOR() { + return this.x; } SCALAR2VECTOR.prototype.get = function SCALAR2VECTOR() { } SCALAR2VECTOR.prototype.set = function SCALAR2VECTOR() { - x = arg1; + this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs); - if (!ok) { -break; -} - nout = int(nout); - if ((nout!=-1&&(nout<=0))) { -message("size of output must be -1 or >0"); - ok = false; -} - if (ok) { - [model,graphics,ok] = check_io(model,graphics,[1],nout,[],[]); -} - if (ok) { - graphics.exprs = exprs; - x.graphics = graphics; - x.model = model; -break; -} -} + [ok,nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs); + if (!ok) { + break; + } + nout = int(nout); + if ((nout!=-1&&(nout<=0))) { + message("size of output must be -1 or >0"); + ok = false; + } + if (ok) { + [model,graphics,ok] = check_io(model,graphics,[1],nout,[],[]); + } + if (ok) { + graphics.exprs = exprs; + this.x.graphics = graphics; + this.x.model = model; + break; + } + } } } |