summaryrefslogtreecommitdiff
path: root/js/Electrical/Resistor.js
diff options
context:
space:
mode:
authorSunil Shetye2018-07-11 13:05:13 +0530
committerSunil Shetye2018-07-11 15:21:08 +0530
commit079d0b4a3ec15a4d7d2644484d116df9d1c694bb (patch)
tree785ed59b5b238203a9e91f3e323da59d1083d86e /js/Electrical/Resistor.js
parent0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff)
downloadsci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip
fix assignment to list
Diffstat (limited to 'js/Electrical/Resistor.js')
-rw-r--r--js/Electrical/Resistor.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js
index efec6abd..d0c91ba5 100644
--- a/js/Electrical/Resistor.js
+++ b/js/Electrical/Resistor.js
@@ -7,7 +7,7 @@ function Resistor() {
this.model.sim = new ScilabString(["resistor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Resistor";
mo.inputs = "p";
mo.outputs = "n";
@@ -15,8 +15,8 @@ function Resistor() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = string(this.R);
- gr_i = [];
+ var exprs = string(this.R);
+ var gr_i = [];
this.x = standard_define([2,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 Resistor() {
Resistor.prototype.set = function Resistor() {
this.R = parseFloat(arguments[0]["R"])
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.R,exprs] = scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),exprs);