summaryrefslogtreecommitdiff
path: root/js/Linear/SAMPHOLD_m.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Linear/SAMPHOLD_m.js')
-rw-r--r--js/Linear/SAMPHOLD_m.js47
1 files changed, 24 insertions, 23 deletions
diff --git a/js/Linear/SAMPHOLD_m.js b/js/Linear/SAMPHOLD_m.js
index 327372ad..c661ad7e 100644
--- a/js/Linear/SAMPHOLD_m.js
+++ b/js/Linear/SAMPHOLD_m.js
@@ -14,38 +14,39 @@ function SAMPHOLD_m() {
model.dep_ut = [true,false];
label = [sci2exp(1)];
gr_i = [];
- x = standard_define([2,2],model,label,gr_i);
+ this.x = standard_define([2,2],model,label,gr_i);
}
SAMPHOLD_m.prototype.details = function SAMPHOLD_m() {
+ return this.x;
}
SAMPHOLD_m.prototype.get = function SAMPHOLD_m() {
}
SAMPHOLD_m.prototype.set = function SAMPHOLD_m() {
- x = arg1;
- x.model.firing = [];
+ this.x = arg1;
+ this.x.model.firing = [];
graphics = arg1.graphics;
label = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,it,exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
- if (!ok) {
-break;
-}
- if (((it<1)||(it>8))) {
-message("Datatype is not supported");
- ok = false;
-}
- if (ok) {
- in1 = [model.in1,model.in2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(in1,it),1,[]);
- if (ok) {
- graphics.exprs = exprs;
- arg1.graphics = graphics;
- arg1.model = model;
- x = arg1;
-break;
-}
-}
-}
+ [ok,it,exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
+ if (!ok) {
+ break;
+ }
+ if (((it<1)||(it>8))) {
+ message("Datatype is not supported");
+ ok = false;
+ }
+ if (ok) {
+ in1 = [model.in1,model.in2];
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(in1,it),1,[]);
+ if (ok) {
+ graphics.exprs = exprs;
+ arg1.graphics = graphics;
+ arg1.model = model;
+ this.x = arg1;
+ break;
+ }
+ }
+ }
}
}