summaryrefslogtreecommitdiff
path: root/js/NonLinear/MAXMIN.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/NonLinear/MAXMIN.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/NonLinear/MAXMIN.js')
-rw-r--r--js/NonLinear/MAXMIN.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/js/NonLinear/MAXMIN.js b/js/NonLinear/MAXMIN.js
index b2121ccd..91bda897 100644
--- a/js/NonLinear/MAXMIN.js
+++ b/js/NonLinear/MAXMIN.js
@@ -25,36 +25,36 @@ function MAXMIN() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,mm,nin,zcr,exprs] = scicos_getvalue("Set Max/Min block parameters",[["Min (1) or Max (2) "],["Number of input vectors (1 or 2)"],["zero-crossing (1: yes, 0;no)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.mm,this.nin,this.zcr,exprs] = scicos_getvalue("Set Max/Min block parameters",[["Min (1) or Max (2) "],["Number of input vectors (1 or 2)"],["zero-crossing (1: yes, 0;no)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (zcr!=0) {
- zcr = -1;
+ if (this.zcr!=0) {
+ this.zcr = -1;
}
- if (mm!=1) {
- mm = 2;
+ if (this.mm!=1) {
+ this.mm = 2;
}
- if (nin!=1&&nin!=2) {
+ if (this.nin!=1&&this.nin!=2) {
message("Wrong number of inputs, only 1 and 2 allowed");
ok = false;
}
if (ok) {
- if (nin==1) {
+ if (this.nin==1) {
[model,graphics,ok] = check_io(model,graphics,-1,1,[],[]);
} else {
[model,graphics,ok] = check_io(model,graphics,[-1,-1],-1,[],[]);
}
}
if (ok) {
- model.nzcross = zcr;
- if (nin==1) {
- model.nmode = abs(zcr);
+ model.nzcross = this.zcr;
+ if (this.nin==1) {
+ model.nmode = abs(this.zcr);
} else {
- model.nmode = zcr;
+ model.nmode = this.zcr;
}
- model.ipar = mm;
- if (mm==1) {
+ model.ipar = this.mm;
+ if (this.mm==1) {
label = "MIN";
} else {
label = "MAX";