diff options
Diffstat (limited to 'js/Linear/DOLLAR_m.js')
-rw-r--r-- | js/Linear/DOLLAR_m.js | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/js/Linear/DOLLAR_m.js b/js/Linear/DOLLAR_m.js index 2e7e5501..daaa8404 100644 --- a/js/Linear/DOLLAR_m.js +++ b/js/Linear/DOLLAR_m.js @@ -1,10 +1,10 @@ /* autogenerated from "macros/Linear/DOLLAR_m.sci" */ function DOLLAR_m() { DOLLAR_m.prototype.define = function DOLLAR_m() { - z = 0; + var z = 0; this.inh = 0; - in1 = 1; - exprs = string([[z],[this.inh]]); + var in1 = 1; + var exprs = string([[z],[this.inh]]); this.model = scicos_model(); this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4])); this.model.in1 = new ScilabDouble([in1]); @@ -13,7 +13,7 @@ function DOLLAR_m() { this.model.dstate = new ScilabDouble([z]); this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [false,false]; - gr_i = []; + var gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } @@ -31,8 +31,8 @@ function DOLLAR_m() { this.a = arguments[0]["a"] this.inh = parseFloat(arguments[0]["inh"]) this.x = arg1; - graphics = arg1.graphics; - exprs = graphics.exprs; + var graphics = arg1.graphics; + var exprs = graphics.exprs; this.model = arg1.model; if (size(exprs,"*")<2) { exprs[2-1] = "0"; @@ -42,51 +42,54 @@ function DOLLAR_m() { if (!ok) { break; } - out = [size(this.a,1),size(this.a,2)]; + var out = [size(this.a,1),size(this.a,2)]; if (out==0) { - out = []; + var out = []; } - in1 = out; + var in1 = out; this.model.sim = list(new ScilabString(["dollar4_m"]), new ScilabDouble([4])); this.model.odstate = list(new ScilabDouble([this.a])); this.model.dstate = []; if ((this.type[this.a-1]==1)) { if (isreal(this.a)) { - it = 1; - ot = 1; + var it = 1; + var ot = 1; if ((size(this.a,1)==1||size(this.a,2)==1)) { this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4])); this.model.dstate = this.a.slice(); this.model.odstate = list(); } } else { - it = 2; - ot = 2; + var it = 2; + var ot = 2; } } else if ((typeof(this.a)=="int32")) { - it = 3; - ot = 3; + var it = 3; + var ot = 3; } else if ((typeof(this.a)=="int16")) { - it = 4; - ot = 4; + var it = 4; + var ot = 4; } else if ((typeof(this.a)=="int8")) { - it = 5; - ot = 5; + var it = 5; + var ot = 5; } else if ((typeof(this.a)=="uint32")) { - it = 6; - ot = 6; + var it = 6; + var ot = 6; } else if ((typeof(this.a)=="uint16")) { - it = 7; - ot = 7; + var it = 7; + var ot = 7; } else if ((typeof(this.a)=="uint8")) { - it = 8; - ot = 8; + var it = 8; + var ot = 8; } else { message("type is not recognized"); - ok = false; + var ok = false; } if (ok) { - [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]); + var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]) + this.model = tmpvar0[0] + var graphics = tmpvar0[1] + var ok = tmpvar0[2]; } if (ok) { graphics.exprs = exprs; |