summaryrefslogtreecommitdiff
path: root/js/Sources/CONST_f.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Sources/CONST_f.js')
-rw-r--r--js/Sources/CONST_f.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js
index abe2b3c8..518831b3 100644
--- a/js/Sources/CONST_f.js
+++ b/js/Sources/CONST_f.js
@@ -9,9 +9,9 @@ function CONST_f() {
this.model.rpar = new ScilabDouble([this.C]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var exprs = strcat(sci2exp(this.C));
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CONST_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = strcat(sci2exp(this.C));
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CONST_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
CONST_f.prototype.details = function CONST_f() {
@@ -24,12 +24,13 @@ function CONST_f() {
}
CONST_f.prototype.set = function CONST_f() {
this.C = parseFloat(arguments[0]["C"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
- [ok,this.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
+ [ok,this.C,this.exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),this.exprs);
if (!ok) {
break;
}
@@ -39,7 +40,7 @@ function CONST_f() {
} else {
this.model.rpar = new ScilabDouble(this.C.slice());
this.model.out = new ScilabDouble([nout]);
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;