/* 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.in = new ScilabDouble([1]); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = new ScilabBoolean([true,false]); var exprs = [string([this.nout])]; var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SCALAR2VECTOR\",sz(1),sz(2));"]); this.x = new standard_define(new ScilabDouble([3,2]),this.model,new ScilabString(exprs),gr_i); return new BasicBlock(this.x); } SCALAR2VECTOR.prototype.details = function SCALAR2VECTOR() { return this.x; } SCALAR2VECTOR.prototype.get = function SCALAR2VECTOR() { var exprs = this.graphics.exprs; this.set_param_popup_title = "Set block parameters"; var options = { nout:["size of output (-1: if don\'t know)",this.nout], } return options; } SCALAR2VECTOR.prototype.set = function SCALAR2VECTOR() { var exprs = this.graphics.exprs; while (true) { var ok = true; this.nout = parseFloat(arguments[0]["nout"]); var exprs = [arguments[0]["nout"]]; if (!ok) { break; } this.nout = int(this.nout); if ((this.nout!=-1&&(this.nout<=0))) { message("size of output must be -1 or >0"); throw "user error"; var ok = false; } if (ok) { var tmpvar0 = check_io(this.model,this.graphics,[1],this.nout,[],[]); this.model = tmpvar0[0]; this.graphics = tmpvar0[1]; var ok = tmpvar0[2]; } if (ok) { this.graphics.exprs = new ScilabDouble([exprs]); this.x.graphics = this.graphics; this.x.model = this.model; break; } } return new BasicBlock(this.x); } SCALAR2VECTOR.prototype.get_popup_title = function SCALAR2VECTOR() { return this.set_param_popup_title; } }