diff options
author | Sunil Shetye | 2018-06-26 14:59:47 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-26 14:59:47 +0530 |
commit | eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 (patch) | |
tree | 6378935263fe5cafd389b6893ac3b37a1dd4b1a7 /js/Sources/RAMP.js | |
parent | afed64f1a0eab0b2d742088186d7bc340a2c895b (diff) | |
download | sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.gz sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.bz2 sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.zip |
add return value from scicos_getvalue to global vars
Diffstat (limited to 'js/Sources/RAMP.js')
-rw-r--r-- | js/Sources/RAMP.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js index ef936b69..41a7654c 100644 --- a/js/Sources/RAMP.js +++ b/js/Sources/RAMP.js @@ -1,10 +1,10 @@ /* autogenerated from "macros/Sources/RAMP.sci" */ function RAMP() { RAMP.prototype.define = function RAMP() { - slope = 0; - iout = 0; - stt = 0; - rpar = [[slope],[stt],[iout]]; + this.slope = 0; + this.iout = 0; + this.stt = 0; + rpar = [[this.slope],[this.stt],[this.iout]]; model = scicos_model(); model.sim = list("ramp",4); model.in1 = []; @@ -30,14 +30,14 @@ function RAMP() { exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,slope,stt,iout,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"RAMP")],[" "],[gettext("Ramp function")],[" "]],[[gettext("Slope")],[gettext("Start Time")],[gettext("Initial Value")]],list("vec",1,"vec",1,"vec",1),exprs); + [ok,this.slope,this.stt,this.iout,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"RAMP")],[" "],[gettext("Ramp function")],[" "]],[[gettext("Slope")],[gettext("Start Time")],[gettext("Initial Value")]],list("vec",1,"vec",1,"vec",1),exprs); if (!ok) { break; } - if (stt<0) { - block_parameter_error(msprintf(gettext("Wrong value for \'Start Time\' parameter: %e."),stt),gettext("Null or positive integer expected.")); + if (this.stt<0) { + block_parameter_error(msprintf(gettext("Wrong value for \'Start Time\' parameter: %e."),this.stt),gettext("Null or positive integer expected.")); } else { - model.rpar = [[slope],[stt],[iout]]; + model.rpar = [[this.slope],[this.stt],[this.iout]]; graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = model; |