summaryrefslogtreecommitdiff
path: root/js/Sources/GENSIN_f.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Sources/GENSIN_f.js')
-rw-r--r--js/Sources/GENSIN_f.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Sources/GENSIN_f.js b/js/Sources/GENSIN_f.js
index ff8153de..9a9f29eb 100644
--- a/js/Sources/GENSIN_f.js
+++ b/js/Sources/GENSIN_f.js
@@ -11,9 +11,9 @@ function GENSIN_f() {
this.model.rpar = new ScilabDouble([1],[1],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = [[string(rpar[1-1])],[string(rpar[2-1])],[string(rpar[3-1])]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GENSIN_f\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.exprs = [[string(rpar[1-1])],[string(rpar[2-1])],[string(rpar[3-1])]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GENSIN_f\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
GENSIN_f.prototype.details = function GENSIN_f() {
@@ -31,12 +31,13 @@ function GENSIN_f() {
this.M = arguments[0]["M"]
this.F = arguments[0]["F"]
this.P = arguments[0]["P"]
+ 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.M,this.F,this.P,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","GENSIN_f")],[" "],["Sine wave generator"],[" "]],["Magnitude","Frequency (rad/s)","Phase (rad)"],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.M,this.F,this.P,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","GENSIN_f")],[" "],["Sine wave generator"],[" "]],["Magnitude","Frequency (rad/s)","Phase (rad)"],list("vec",1,"vec",1,"vec",1),this.exprs);
if (!ok) {
break;
}
@@ -52,7 +53,7 @@ function GENSIN_f() {
this.model.rpar = new ScilabDouble([this.M],[this.F],[this.P]);
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;