diff options
author | Sunil Shetye | 2018-07-11 13:05:13 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-11 15:21:08 +0530 |
commit | 079d0b4a3ec15a4d7d2644484d116df9d1c694bb (patch) | |
tree | 785ed59b5b238203a9e91f3e323da59d1083d86e /js/Electrical/ConstantVoltage.js | |
parent | 0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff) | |
download | sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2 sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip |
fix assignment to list
Diffstat (limited to 'js/Electrical/ConstantVoltage.js')
-rw-r--r-- | js/Electrical/ConstantVoltage.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js index b38412a4..86527aec 100644 --- a/js/Electrical/ConstantVoltage.js +++ b/js/Electrical/ConstantVoltage.js @@ -9,14 +9,14 @@ function ConstantVoltage() { this.model.sim = new ScilabString(["ConstantVoltage"]); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,false]; - mo = modelica(); + var mo = modelica(); mo.model = "ConstantVoltage"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list("V",list(this.V)); this.model.equations = new ScilabDouble([mo]); - exprs = string(this.V); - gr_i = []; + var exprs = string(this.V); + var gr_i = []; this.x = standard_define([1.5,1.1],this.model,exprs,list(gr_i,0)); this.x.graphics.in_implicit = ["I"]; this.x.graphics.out_implicit = ["I"]; @@ -33,8 +33,8 @@ function ConstantVoltage() { ConstantVoltage.prototype.set = function ConstantVoltage() { this.V = parseFloat(arguments[0]["V"]) 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.V,exprs] = scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),exprs); |