diff options
Diffstat (limited to 'js/Sources/STEP.js')
-rw-r--r-- | js/Sources/STEP.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js index 83914ef6..a22157bc 100644 --- a/js/Sources/STEP.js +++ b/js/Sources/STEP.js @@ -1,7 +1,7 @@ /* autogenerated from "macros/Sources/STEP.sci" */ function STEP() { STEP.prototype.define = function STEP() { - rpar = [[0],[1]]; + var rpar = [[0],[1]]; this.model = scicos_model(); this.model.sim = list(new ScilabString(["step_func"]), new ScilabDouble([4])); this.model.evtin = new ScilabDouble([1]); @@ -13,8 +13,8 @@ function STEP() { this.model.rpar = new ScilabDouble(rpar); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,false]; - exprs = [[string(1)],[string(rpar)]]; - gr_i = []; + var exprs = [[string(1)],[string(rpar)]]; + var gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } @@ -34,8 +34,8 @@ function STEP() { this.in1 = arguments[0]["in1"] this.fi = arguments[0]["fi"] this.x = arg1; - graphics = arg1.graphics; - exprs = graphics.exprs; + var graphics = arg1.graphics; + var exprs = graphics.exprs; this.model = arg1.model; while (true) { [ok,this.temps,this.in1,this.fi,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","STEP_FUNCTION")],[" "],["Step Function"],[" "]],["Step Time","Initial Value","Final Value"],list("vec",1,"vec",-1,"vec",-1),exprs); @@ -51,20 +51,23 @@ function STEP() { this.fi = this.fi*ones(this.in1); } else { block_parameter_error(msprintf("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d.",size(this.in1,"*"),size(this.fi,"*")),"Same sizes expected."); - ok = false; + var ok = false; } } if (ok) { this.model.out2 = new ScilabDouble([1]); this.model.outtyp = new ScilabDouble([1]); - [this.model,graphics,ok] = check_io(this.model,graphics,[],size(this.fi,"*"),1,1); + var tmpvar0 = check_io(this.model,graphics,[],size(this.fi,"*"),1,1) + this.model = tmpvar0[0] + var graphics = tmpvar0[1] + var ok = tmpvar0[2]; } if (ok) { this.model.firing = new ScilabDouble([this.temps]); if (this.temps==0) { - rpar = [[this.fi],[this.fi]]; + var rpar = [[this.fi],[this.fi]]; } else { - rpar = [[this.in1],[this.fi]]; + var rpar = [[this.in1],[this.fi]]; } this.model.rpar = new ScilabDouble(rpar); graphics.exprs = exprs; |