/* autogenerated from "macros/Branching/SCALAR2VECTOR.sci" */ function SCALAR2VECTOR() { SCALAR2VECTOR.prototype.define = function SCALAR2VECTOR() { this.nout = -1; this.model = scicos_model(); this.model.sim = list(new ScilabString(["scalar2vector"]), new ScilabDouble([4])); this.model.out = new ScilabDouble([this.nout]); this.model.in1 = new ScilabDouble([1]); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; exprs = [string([this.nout])]; gr_i = []; this.x = standard_define([3,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } SCALAR2VECTOR.prototype.details = function SCALAR2VECTOR() { return this.x; } SCALAR2VECTOR.prototype.get = function SCALAR2VECTOR() { var options = { nout:["size of output (-1: if don\'t know)",this.nout], } return options; } SCALAR2VECTOR.prototype.set = function SCALAR2VECTOR() { this.nout = parseFloat(arguments[0]["nout"]) this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; this.model = arg1.model; while (true) { [ok,this.nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs); if (!ok) { break; } this.nout = int(this.nout); if ((this.nout!=-1&&(this.nout<=0))) { message("size of output must be -1 or >0"); ok = false; } if (ok) { [model,graphics,ok] = check_io(this.model,graphics,[1],this.nout,[],[]); } if (ok) { graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = this.model; break; } } return new BasicBlock(this.x); } }