diff options
Diffstat (limited to 'js/Branching/RELAY_f.js')
-rw-r--r-- | js/Branching/RELAY_f.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/js/Branching/RELAY_f.js b/js/Branching/RELAY_f.js index a6e811d7..69020ac6 100644 --- a/js/Branching/RELAY_f.js +++ b/js/Branching/RELAY_f.js @@ -1,8 +1,8 @@ /* autogenerated from "macros/Branching/RELAY_f.sci" */ function RELAY_f() { RELAY_f.prototype.define = function RELAY_f() { - i0 = 0; - in1 = [[-1],[-1]]; + var i0 = 0; + var in1 = [[-1],[-1]]; this.nin = 2; this.model = scicos_model(); this.model.sim = list(new ScilabString(["relay"]), new ScilabDouble([2])); @@ -13,8 +13,8 @@ function RELAY_f() { this.model.blocktype = new ScilabString(["c"]); this.model.firing = []; this.model.dep_ut = [true,true]; - exprs = [[string(this.nin)],[string(i0+1)]]; - gr_i = []; + var exprs = [[string(this.nin)],[string(i0+1)]]; + var gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } @@ -32,10 +32,10 @@ function RELAY_f() { this.nin = parseFloat(arguments[0]["nin"]) this.z0 = arguments[0]["z0"] this.x = arg1; - graphics = arg1.graphics; - exprs = graphics.exprs; + var graphics = arg1.graphics; + var exprs = graphics.exprs; this.model = arg1.model; - ipar = this.model.ipar; + var ipar = this.model.ipar; 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) { @@ -44,7 +44,10 @@ function RELAY_f() { if (this.z0>this.nin||this.z0<=0) { message("initial connected input is not a valid input port number"); } else { - [this.model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]); + var tmpvar0 = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]) + this.model = tmpvar0[0] + var graphics = tmpvar0[1] + var ok = tmpvar0[2]; if (ok) { graphics.exprs = exprs; this.model.dstate = new ScilabString([this.z0-1]); |