summaryrefslogtreecommitdiff
path: root/js/IntegerOp/JKFLIPFLOP.js
diff options
context:
space:
mode:
authorSunil Shetye2018-06-26 14:59:47 +0530
committerSunil Shetye2018-06-26 14:59:47 +0530
commiteb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 (patch)
tree6378935263fe5cafd389b6893ac3b37a1dd4b1a7 /js/IntegerOp/JKFLIPFLOP.js
parentafed64f1a0eab0b2d742088186d7bc340a2c895b (diff)
downloadsci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.gz
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.bz2
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.zip
add return value from scicos_getvalue to global vars
Diffstat (limited to 'js/IntegerOp/JKFLIPFLOP.js')
-rw-r--r--js/IntegerOp/JKFLIPFLOP.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js
index 17aa3c0d..fcada59b 100644
--- a/js/IntegerOp/JKFLIPFLOP.js
+++ b/js/IntegerOp/JKFLIPFLOP.js
@@ -67,25 +67,25 @@ function JKFLIPFLOP() {
model = xx.model;
init_old = model.odstate[1-1];
while (true) {
- [ok,init,exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"JKFLIPFLOP")],[" "],[gettext("JK flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext(" - Negative values are considered as int8(0)")],[gettext(" - Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs);
+ [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"JKFLIPFLOP")],[" "],[gettext("JK flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext(" - Negative values are considered as int8(0)")],[gettext(" - Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs);
if (!ok) {
break;
}
- if (init<=0) {
- init = int8(0);
- } else if (init>0) {
- init = int8(1);
+ if (this.init<=0) {
+ this.init = int8(0);
+ } else if (this.init>0) {
+ this.init = int8(1);
}
if (ok) {
- xx.graphics.exprs[1-1] = exprs0;
- model.odstate[1-1] = init;
+ xx.graphics.exprs[1-1] = this.exprs0;
+ model.odstate[1-1] = this.init;
xx.model = model;
arg1.model.rpar.objs[path-1] = xx;
break;
}
}
needcompile = 0;
- if (init_old!=init) {
+ if (init_old!=this.init) {
newpar[size(newpar)+1-1] = 1;
needcompile = 2;
}