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.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/js/Sources/GENSIN_f.js b/js/Sources/GENSIN_f.js
index 65839948..ceece8f2 100644
--- a/js/Sources/GENSIN_f.js
+++ b/js/Sources/GENSIN_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/GENSIN_f.sci" */
function GENSIN_f() {
GENSIN_f.prototype.define = function GENSIN_f() {
- rpar = [[1],[1],[0]];
+ var rpar = [[1],[1],[0]];
this.model = scicos_model();
this.model.sim = new ScilabString(["gensin"]);
this.model.in1 = [];
@@ -11,8 +11,8 @@ function GENSIN_f() {
this.model.rpar = new ScilabDouble([1],[1],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[string(rpar[1-1])],[string(rpar[2-1])],[string(rpar[3-1])]];
- gr_i = [];
+ var exprs = [[string(rpar[1-1])],[string(rpar[2-1])],[string(rpar[3-1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,8 +32,8 @@ function GENSIN_f() {
this.F = arguments[0]["F"]
this.P = arguments[0]["P"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = 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);
@@ -42,10 +42,13 @@ function GENSIN_f() {
}
if (this.F<0) {
block_parameter_error(msprintf("Wrong value for \'Frequency\' parameter: %e.",this.F),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[],1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[],1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.rpar = new ScilabDouble([this.M],[this.F],[this.P]);
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);