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/SineVoltage.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/SineVoltage.js')
-rw-r--r-- | js/Electrical/SineVoltage.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js index 6906c803..7db61627 100644 --- a/js/Electrical/SineVoltage.js +++ b/js/Electrical/SineVoltage.js @@ -13,14 +13,14 @@ function SineVoltage() { this.model.sim = new ScilabString(["SineVoltage"]); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; - mo = modelica(); + var mo = modelica(); mo.model = "SineVoltage"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list([["V"],["phase"],["freqHz"],["offset"],["startTime"]],list(this.V,this.ph,this.frq,this.offset,this.start)); this.model.equations = new ScilabDouble([mo]); - exprs = [[string(this.V)],[string(this.ph)],[string(this.frq)],[string(this.offset)],[string(this.start)]]; - gr_i = []; + var exprs = [[string(this.V)],[string(this.ph)],[string(this.frq)],[string(this.offset)],[string(this.start)]]; + var gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); this.x.graphics.in_implicit = ["I"]; this.x.graphics.out_implicit = ["I"]; @@ -46,8 +46,8 @@ function SineVoltage() { this.offset = parseFloat(arguments[0]["offset"]) this.start = parseFloat(arguments[0]["start"]) 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,this.ph,this.frq,this.offset,this.start,exprs] = scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","phase (rad)","Frequency (Hz)","Voltageoffset (V)","Timeoffset (s)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); |