summaryrefslogtreecommitdiff
path: root/js/Sources
diff options
context:
space:
mode:
Diffstat (limited to 'js/Sources')
-rw-r--r--js/Sources/CLKINV_f.js10
-rw-r--r--js/Sources/CLKIN_f.js8
-rw-r--r--js/Sources/CLOCK_c.js36
-rw-r--r--js/Sources/CLOCK_f.js36
-rw-r--r--js/Sources/CONST.js12
-rw-r--r--js/Sources/CONST_f.js10
-rw-r--r--js/Sources/CONST_m.js33
-rw-r--r--js/Sources/CONST_m.pickle39
-rw-r--r--js/Sources/CURVE_c.js91
-rw-r--r--js/Sources/CURVE_c.pickle674
-rw-r--r--js/Sources/CURV_f.js44
-rw-r--r--js/Sources/CURV_f.pickle25
-rw-r--r--js/Sources/Counter.js8
-rw-r--r--js/Sources/FROMWSB.js48
-rw-r--r--js/Sources/FROMWS_c.js25
-rw-r--r--js/Sources/FROMWS_c.pickle43
-rw-r--r--js/Sources/GENSIN_f.js17
-rw-r--r--js/Sources/GENSIN_f.pickle84
-rw-r--r--js/Sources/GENSQR_f.js10
-rw-r--r--js/Sources/GEN_SQR.js52
-rw-r--r--js/Sources/GEN_SQR.pickle96
-rw-r--r--js/Sources/Ground_g.js6
-rw-r--r--js/Sources/INIMPL_f.js16
-rw-r--r--js/Sources/IN_f.js27
-rw-r--r--js/Sources/IN_f.pickle87
-rw-r--r--js/Sources/Modulo_Count.js8
-rw-r--r--js/Sources/PULSE_SC.js52
-rw-r--r--js/Sources/PULSE_SC.pickle94
-rw-r--r--js/Sources/RAMP.js10
-rw-r--r--js/Sources/RAND_f.js18
-rw-r--r--js/Sources/RAND_m.js31
-rw-r--r--js/Sources/RAND_m.pickle47
-rw-r--r--js/Sources/READAU_f.js63
-rw-r--r--js/Sources/READAU_f.pickle39
-rw-r--r--js/Sources/READC_f.js63
-rw-r--r--js/Sources/READC_f.pickle39
-rw-r--r--js/Sources/RFILE_f.js61
-rw-r--r--js/Sources/RFILE_f.pickle38
-rw-r--r--js/Sources/SAWTOOTH_f.js4
-rw-r--r--js/Sources/STEP.js21
-rw-r--r--js/Sources/STEP.pickle49
-rw-r--r--js/Sources/STEP_FUNCTION.js56
-rw-r--r--js/Sources/SampleCLK.js14
-rw-r--r--js/Sources/Sigbuilder.js44
-rw-r--r--js/Sources/TIME_f.js2
-rw-r--r--js/Sources/TKSCALE.js8
46 files changed, 1119 insertions, 1179 deletions
diff --git a/js/Sources/CLKINV_f.js b/js/Sources/CLKINV_f.js
index 4daea14e..fe23a42a 100644
--- a/js/Sources/CLKINV_f.js
+++ b/js/Sources/CLKINV_f.js
@@ -9,8 +9,8 @@ function CLKINV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
- gr_i = [];
+ var exprs = string(this.prt);
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new EventInBlock(this.x);
}
@@ -25,10 +25,10 @@ function CLKINV_f() {
CLKINV_f.prototype.set = function CLKINV_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
- exprs = exprs[1-1];
+ var exprs = graphics.exprs;
+ var exprs = exprs[1-1];
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CLKINV_f")],[" "],["Event input port"],[" "]],"Port Number",list("vec",1),exprs);
this.prt = int(this.prt);
diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js
index b6c17b87..a4b5c636 100644
--- a/js/Sources/CLKIN_f.js
+++ b/js/Sources/CLKIN_f.js
@@ -9,7 +9,7 @@ function CLKIN_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
+ var exprs = string(this.prt);
this.x = standard_define([1,1],this.model,exprs," ");
return new BasicBlock(this.x);
}
@@ -24,10 +24,10 @@ function CLKIN_f() {
CLKIN_f.prototype.set = function CLKIN_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
- exprs = exprs[1-1];
+ var exprs = graphics.exprs;
+ var exprs = exprs[1-1];
while (true) {
[ok,this.prt,exprs] = scicos_getvalue("Set Event Input block parameters","Port number",list("vec",1),exprs);
this.prt = int(this.prt);
diff --git a/js/Sources/CLOCK_c.js b/js/Sources/CLOCK_c.js
index 10cc65e7..1642f70c 100644
--- a/js/Sources/CLOCK_c.js
+++ b/js/Sources/CLOCK_c.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/CLOCK_c.sci" */
function CLOCK_c() {
CLOCK_c.prototype.define = function CLOCK_c() {
- evtdly = EVTDLY_c("define");
+ var evtdly = EVTDLY_c("define");
evtdly.graphics.orig = [320,232];
evtdly.graphics.sz = [40,40];
evtdly.graphics.flip = true;
@@ -10,19 +10,19 @@ function CLOCK_c() {
evtdly.graphics.peout = 3;
evtdly.model.rpar = [[0.1],[0.1]];
evtdly.model.firing = 0.1;
- output_port = CLKOUT_f("define");
+ var output_port = CLKOUT_f("define");
output_port.graphics.orig = [399,162];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = "1";
output_port.graphics.pein = 5;
output_port.model.ipar = 1;
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[380.71066],[172]];
split.graphics.pein = 3;
split.graphics.peout = [[5],[6]];
- gr_i = [];
- diagram = scicos_diagram();
+ var gr_i = [];
+ var diagram = scicos_diagram();
diagram.objs[1-1] = output_port;
diagram.objs[2-1] = evtdly;
diagram.objs[3-1] = scicos_link(xx=[[340],[340],[380.71]],yy=[[226.29],[172],[172]],ct=[5,-1],from=[2,1],to=[4,1]);
@@ -57,19 +57,19 @@ function CLOCK_c() {
this.t0 = arguments[0]["t0"]
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="EVTDLY_c") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs;
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs;
this.model = xx.model;
- t0_old = this.model.firing;
- dt_old = this.model.rpar[1-1];
- model_n = this.model;
+ var t0_old = this.model.firing;
+ var dt_old = this.model.rpar[1-1];
+ var model_n = this.model;
while (true) {
[ok,this.dt,this.t0,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","CLOCK_c")],[" "],["Event clock generator"],[" "],["&nbsp; Do not start if \'Initialisation Time\' is negative"],[" "]],["Period","Initialisation Time"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -77,7 +77,7 @@ function CLOCK_c() {
}
if (this.dt<=0) {
block_parameter_error(msprintf("Wrong values for \'%s\' parameter: %5.1e.","Period",this.dt),"Strictly positive number expected.");
- ok = false;
+ var ok = false;
}
if (ok) {
xx.graphics.exprs = this.exprs0;
@@ -92,13 +92,13 @@ function CLOCK_c() {
newpar[size(newpar)+1-1] = path;
}
if (t0_old!=this.t0) {
- needcompile = 2;
+ var needcompile = 2;
} else {
- needcompile = 0;
+ var needcompile = 0;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/CLOCK_f.js b/js/Sources/CLOCK_f.js
index 05832c5f..a18cfc4b 100644
--- a/js/Sources/CLOCK_f.js
+++ b/js/Sources/CLOCK_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/CLOCK_f.sci" */
function CLOCK_f() {
CLOCK_f.prototype.define = function CLOCK_f() {
- evtdly = EVTDLY_f("define");
+ var evtdly = EVTDLY_f("define");
evtdly.graphics.orig = [320,232];
evtdly.graphics.sz = [40,40];
evtdly.graphics.flip = true;
@@ -10,19 +10,19 @@ function CLOCK_f() {
evtdly.graphics.peout = 3;
evtdly.model.rpar = 0.1;
evtdly.model.firing = 0.1;
- output_port = CLKOUT_f("define");
+ var output_port = CLKOUT_f("define");
output_port.graphics.orig = [399,162];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = "1";
output_port.graphics.pein = 5;
output_port.model.ipar = 1;
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[380.71066],[172]];
split.graphics.pein = 3;
split.graphics.peout = [[5],[6]];
- gr_i = [];
- diagram = scicos_diagram();
+ var gr_i = [];
+ var diagram = scicos_diagram();
diagram.objs[1-1] = output_port;
diagram.objs[2-1] = evtdly;
diagram.objs[3-1] = scicos_link(xx=[[340],[340],[380.71]],yy=[[226.29],[172],[172]],ct=[5,-1],from=[2,1],to=[4,1]);
@@ -57,19 +57,19 @@ function CLOCK_f() {
this.t0 = arguments[0]["t0"]
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="EVTDLY_f") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs;
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs;
this.model = xx.model;
- t0_old = this.model.firing;
- dt_old = this.model.rpar;
- model_n = this.model;
+ var t0_old = this.model.firing;
+ var dt_old = this.model.rpar;
+ var model_n = this.model;
while (true) {
[ok,this.dt,this.t0,this.exprs0] = scicos_getvalue("Set Clock block parameters",["Period","Init time"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -77,7 +77,7 @@ function CLOCK_f() {
}
if (this.dt<=0) {
message("period must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
xx.graphics.exprs = this.exprs0;
@@ -92,13 +92,13 @@ function CLOCK_f() {
newpar[size(newpar)+1-1] = path;
}
if (t0_old!=this.t0) {
- needcompile = 2;
+ var needcompile = 2;
} else {
- needcompile = 0;
+ var needcompile = 0;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/CONST.js b/js/Sources/CONST.js
index f42bf2cf..82b1795b 100644
--- a/js/Sources/CONST.js
+++ b/js/Sources/CONST.js
@@ -9,8 +9,8 @@ function CONST() {
this.model.rpar = new ScilabDouble([this.C]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(sci2exp(this.C));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.C));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -25,16 +25,16 @@ function CONST() {
CONST.prototype.set = function CONST() {
this.C = parseFloat(arguments[0]["C"])
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.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
if (!ok) {
break;
}
- sz = size(this.C);
- nout = size(this.C,"*");
+ var sz = size(this.C);
+ var nout = size(this.C,"*");
if (nout==0) {
message("C must have at least one element");
} else if (and(sz>1)) {
diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js
index ad63477d..cb76e0fb 100644
--- a/js/Sources/CONST_f.js
+++ b/js/Sources/CONST_f.js
@@ -9,8 +9,8 @@ function CONST_f() {
this.model.rpar = new ScilabDouble([this.C]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(sci2exp(this.C));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.C));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -25,15 +25,15 @@ function CONST_f() {
CONST_f.prototype.set = function CONST_f() {
this.C = parseFloat(arguments[0]["C"])
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.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
if (!ok) {
break;
}
- nout = size(this.C,"*");
+ var nout = size(this.C,"*");
if (nout==0) {
message("C must have at least one element");
} else {
diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js
index fef8996f..c2357e68 100644
--- a/js/Sources/CONST_m.js
+++ b/js/Sources/CONST_m.js
@@ -12,8 +12,8 @@ function CONST_m() {
this.model.opar = list();
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = sci2exp(this.C);
- gr_i = [];
+ var exprs = sci2exp(this.C);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,15 +28,15 @@ function CONST_m() {
CONST_m.prototype.set = function CONST_m() {
this.C = inverse(arguments[0]["C"])
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.C,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONST_m")],[" "],["Constant value generator"],[" "]],"Constant Value",list("vec",-1),exprs);
if (!ok) {
break;
}
- nout = size(this.C);
+ var nout = size(this.C);
if (find(nout==0)!=[]) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter","Constant Value"),"Constant value must have at least one element.");
} else {
@@ -44,29 +44,32 @@ function CONST_m() {
this.model.opar = list(this.C);
if ((this.type[this.C-1]==1)) {
if (isreal(this.C)) {
- ot = 1;
+ var ot = 1;
} else {
- ot = 2;
+ var ot = 2;
}
} else if ((typeof(this.C)=="int32")) {
- ot = 3;
+ var ot = 3;
} else if ((typeof(this.C)=="int16")) {
- ot = 4;
+ var ot = 4;
} else if ((typeof(this.C)=="int8")) {
- ot = 5;
+ var ot = 5;
} else if ((typeof(this.C)=="uint32")) {
- ot = 6;
+ var ot = 6;
} else if ((typeof(this.C)=="uint16")) {
- ot = 7;
+ var ot = 7;
} else if ((typeof(this.C)=="uint8")) {
- ot = 8;
+ var ot = 8;
} else {
block_parameter_error(msprintf("Wrong type for \'%s\' parameter","Constant Value"),"Value type must be a numeric type (double, complex, int, int8, ...).");
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.rpar = [];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list(nout,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(),list(nout,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/CONST_m.pickle b/js/Sources/CONST_m.pickle
index 2b3f2d42..787cefcc 100644
--- a/js/Sources/CONST_m.pickle
+++ b/js/Sources/CONST_m.pickle
@@ -43,53 +43,50 @@ p12
sS'C'
p13
g8
-sS'[this.model,graphics,ok]'
-p14
-g6
sS'model.out2'
-p15
+p14
g6
sS'model.rpar'
-p16
+p15
g8
sS'graphics.exprs'
-p17
+p16
NsS'typ'
-p18
+p17
g8
sS'model.opar'
-p19
+p18
g12
sS'ok'
-p20
+p19
S'boolean'
-p21
+p20
sS'model.blocktype'
-p22
+p21
S'string'
-p23
+p22
sS'model.dep_ut'
-p24
+p23
g8
sS'exprs'
-p25
-g23
+p24
+g22
sS'gr_i'
-p26
+p25
g8
sS'y'
-p27
+p26
g8
sS'x'
-p28
+p27
g6
sS'model'
-p29
+p28
g2
sS'ot'
-p30
+p29
g6
sS'nout'
-p31
+p30
g6
s. \ No newline at end of file
diff --git a/js/Sources/CURVE_c.js b/js/Sources/CURVE_c.js
index 742bfed7..0076b715 100644
--- a/js/Sources/CURVE_c.js
+++ b/js/Sources/CURVE_c.js
@@ -4,10 +4,10 @@ function CURVE_c() {
this.model = scicos_model();
this.xx = [0,1,2];
this.yy = [10,20,-30];
- N = 3;
+ var N = 3;
this.Method = 3;
this.PeriodicOption = "y";
- Graf = "n";
+ var Graf = "n";
this.model.sim = list(new ScilabString(["curve_c"]), new ScilabDouble([4]));
this.model.in1 = [];
this.model.out = new ScilabDouble([1]);
@@ -18,8 +18,8 @@ function CURVE_c() {
this.model.evtin = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.firing = new ScilabDouble([0]);
- exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[this.PeriodicOption],[Graf]];
- gr_i = [];
+ var exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[this.PeriodicOption],[Graf]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -44,70 +44,78 @@ function CURVE_c() {
this.graf = arguments[0]["graf"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- ok = false;
- SaveExit = false;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var ok = false;
+ var SaveExit = false;
while (true) {
- Ask_again = false;
+ var Ask_again = false;
[ok,this.Method,this.xx,this.yy,this.PeriodicOption,this.graf,exprs] = scicos_getvalue("Spline data",["Spline Method (0..7)","x","y","Periodic signal(y/n)?","Launch graphic window(y/n)?"],list("vec",1,"vec",-1,"vec",-1,"str",1,"str",1),exprs);
if (!ok) {
break;
}
if (this.PeriodicOption=="y"||this.PeriodicOption=="Y") {
- PO = 1;
+ var PO = 1;
} else {
exprs[4-1] = "n";
- PO = 0;
+ var PO = 0;
}
- mtd = int(this.Method);
+ var mtd = int(this.Method);
if (mtd<0) {
- mtd = 0;
+ var mtd = 0;
}
if (mtd>7) {
- mtd = 7;
+ var mtd = 7;
}
- METHOD = getmethod(mtd);
+ var METHOD = getmethod(mtd);
if (!Ask_again) {
this.xx = this.xx.slice();
this.yy = this.yy.slice();
- [nx,mx] = size(this.xx);
- [ny,my] = size(this.yy);
+ var tmpvar0 = size(this.xx)
+ var nx = tmpvar0[0]
+ var mx = tmpvar0[1];
+ var tmpvar1 = size(this.yy)
+ var ny = tmpvar1[0]
+ var my = tmpvar1[1];
if (!((nx==ny)&&(mx==my))) {
messagebox("Incompatible size of [x] and [y]","modal","error");
- Ask_again = true;
+ var Ask_again = true;
}
}
if (!Ask_again) {
this.xy = [this.xx,this.yy];
- [this.xy] = cleandata(this.xy);
- N = size(this.xy,"r");
+ var tmpvar2 = cleandata(this.xy)
+ this.xy = tmpvar2[0];
+ var N = size(this.xy,"r");
exprs[5-1] = "n";
if (this.graf=="y"||this.graf=="Y") {
- ipar = [[N],[mtd],[PO]];
- rpar = [];
+ var ipar = [[N],[mtd],[PO]];
+ var rpar = [];
if ((winsid()==[])) {
this.curwin = 0;
} else {
this.curwin = max(winsid())+1;
}
- [orpar,oipar,ok] = poke_point(this.xy,ipar,rpar);
+ var tmpvar3 = poke_point(this.xy,ipar,rpar)
+ var orpar = tmpvar3[0]
+ var oipar = tmpvar3[1]
+ var ok = tmpvar3[2];
if (!ok) {
break;
}
- N2 = oipar[1-1];
- xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
- New_methhod = oipar[2-1];
- DChange = false;
- METHOD = getmethod(New_methhod);
+ var N2 = oipar[1-1];
+ var xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
+ var New_methhod = oipar[2-1];
+ var DChange = false;
+ var METHOD = getmethod(New_methhod);
if (or(this.xy.slice()[1-1]!=xy2.slice()[1-1])) {
- DChange = true;
+ var DChange = true;
}
if (or(this.xy.slice(1-1,N-1)[2-1]!=xy2.slice(1-1,N2-1)[2-1])) {
- DChange = true;
+ var DChange = true;
}
if ((this.xy[N-1][2-1]!=xy2[N2-1][2-1]&&(METHOD!="periodic"))) {
- DChange = true;
+ var DChange = true;
}
if (DChange) {
exprs[2-1] = strcat(sci2exp(xy2.slice()[1-1]));
@@ -115,31 +123,34 @@ function CURVE_c() {
}
exprs[1-1] = sci2exp(New_methhod);
if (oipar[3-1]==1) {
- perop = "y";
+ var perop = "y";
} else {
- perop = "n";
+ var perop = "n";
}
exprs[4-1] = perop;
- SaveExit = true;
+ var SaveExit = true;
} else {
- [Xdummy,Ydummy,orpar] = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1]);
+ var tmpvar4 = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1])
+ var Xdummy = tmpvar4[0]
+ var Ydummy = tmpvar4[1]
+ var orpar = tmpvar4[2];
if ((METHOD=="periodic")) {
this.xy[N-1][2-1] = this.xy[1-1][2-1];
}
if ((METHOD=="order 2"||METHOD=="not_a_knot"||METHOD=="periodic"||METHOD=="monotone"||METHOD=="fast"||METHOD=="clamped")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
} else {
if ((METHOD=="zero order"||METHOD=="linear")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
}
}
exprs[1-1] = sci2exp(mtd);
- oipar = [[N],[mtd],[PO]];
- SaveExit = true;
+ var oipar = [[N],[mtd],[PO]];
+ var SaveExit = true;
}
}
if ((SaveExit)) {
- xp = find(orpar.slice(1-1,oipar[1-1])>=0);
+ var xp = find(orpar.slice(1-1,oipar[1-1])>=0);
if ((xp!=[])) {
this.model.firing = new ScilabDouble([orpar[xp[1-1]-1]]);
} else {
diff --git a/js/Sources/CURVE_c.pickle b/js/Sources/CURVE_c.pickle
index 3bc4ee41..8aca82e4 100644
--- a/js/Sources/CURVE_c.pickle
+++ b/js/Sources/CURVE_c.pickle
@@ -155,796 +155,724 @@ S'string'
p4
sS'Sin_exprs'
p5
-NsS'ya'
+NsS'xenR'
p6
S'double'
p7
-sS'xenR'
+sS'x2'
p8
-g7
-sS'[orpar,oipar]'
-p9
-g7
+g4
sS'Y[j-1]'
-p10
-g7
-sS'NC'
-p11
+p9
g7
sS'Ask_again'
-p12
+p10
S'boolean'
-p13
+p11
sS'y1'
-p14
+p12
g4
sS'Amp3'
-p15
+p13
g2
sS'curwin'
-p16
+p14
g7
sS'Standm'
-p17
+p15
g4
sS'xenC'
-p18
+p16
g4
sS'yenR'
-p19
+p17
g7
sS'a.title.text'
-p20
+p18
g2
sS'xmn'
-p21
+p19
g7
sS'x1'
-p22
+p20
g4
sS'ye[zz-1]'
-p23
+p21
g2
sS'lx21'
-p24
+p22
g7
sS'xstC'
-p25
+p23
g4
sS'ymx'
-p26
-g7
-sS'Zt'
-p27
-S'matrix'
-p28
-sS'[this.xy,rpar,ipar]'
-p29
-g7
-sS'[xtt,k2]'
-p30
+p24
g7
sS'Bt'
-p31
-g28
+p25
+S'matrix'
+p26
sS'a.title.font_size'
-p32
+p27
g7
sS'xmx'
-p33
+p28
g7
sS'x1p'
-p34
+p29
g7
sS'random_n_exprs'
-p35
+p30
S'list'
-p36
+p31
sS'a.axes_visible'
-p37
+p32
g4
sS'METHOD'
-p38
+p33
g7
sS'PeriodicOption'
-p39
+p34
g4
sS'ymn'
-p40
+p35
g7
sS'NOrder'
-p41
+p36
g7
sS'var4'
-p42
+p37
g2
sS'xa'
-p43
+p38
g7
sS'yo'
-p44
+p39
g7
sS'y22'
-p45
+p40
g4
-sS'[sok]'
-p46
+sS'ya'
+p41
g7
sS'YMX'
-p47
+p42
g7
sS'yc'
-p48
+p43
g7
sS'a.title.foreground'
-p49
+p44
g7
sS'model.rpar'
-p50
-g28
+p45
+g26
sS'yy'
-p51
+p46
g2
sS'x[zz-1]'
-p52
+p47
g2
sS'Pulse_exprs'
-p53
+p48
NsS'dx'
-p54
+p49
g7
sS'dy'
-p55
+p50
g7
sS'random_n_exprs2'
-p56
-g36
+p51
+g31
sS'a.clip_state'
-p57
+p52
g4
sS'yt'
-p58
+p53
g7
sS'model.blocktype'
-p59
-g4
-sS'x21'
-p60
+p54
g4
sS'splines'
-p61
+p55
NsS'oipar'
-p62
+p56
NsS'MENU'
-p63
+p57
g2
sS't4'
-p64
+p58
g4
sS't5'
-p65
+p59
g4
sS't2'
-p66
+p60
g4
sS'x.model'
-p67
+p61
NsS'model.dep_ut'
-p68
+p62
g2
sS'menu_s'
-p69
+p63
g2
-sS'Sawt1_exprs'
-p70
-NsS'sample4'
-p71
+sS'sample5'
+p64
+g2
+sS'sample4'
+p65
g2
sS'sTp2'
-p72
+p66
g2
sS'x'
-p73
+p67
g7
sS'x12'
-p74
+p68
g4
-sS'[ny,my]'
-p75
-g7
sS'exprs[1-1]'
-p76
+p69
g4
sS'points.data'
-p77
+p70
g2
sS'j'
-p78
+p71
g4
-sS'[nx,mx]'
-p79
-g7
sS'x11'
-p80
+p72
g4
sS'arg1'
-p81
+p73
S'object'
-p82
+p74
sS'Pd3'
-p83
+p75
g2
sS't3'
-p84
+p76
g4
sS'ey'
-p85
+p77
g7
sS'ex'
-p86
+p78
g7
sS'zz'
-p87
+p79
g7
sS'sAmp'
-p88
+p80
g2
sS'a.children[2-1]'
-p89
-g82
-sS'sample5'
-p90
-g2
-sS'a.title.font_style'
-p91
+p81
+g74
+sS'Sawt1_exprs'
+p82
+NsS'a.title.font_style'
+p83
g7
sS'y2'
-p92
+p84
g4
sS'orpar'
-p93
+p85
g2
sS'x.graphics'
-p94
-g82
-sS'A[j+2-1][i+N+1-1]'
-p95
-g7
+p86
+g74
sS'menu_d'
-p96
+p87
g2
sS'menu_e'
-p97
+p88
g2
sS'ye[$+1-1]'
-p98
+p89
g7
-sS'xy[zz-1].slice()'
-p99
-g2
sS'A[j+1-1][i+N-1]'
-p100
+p90
g7
sS'a.children[1-1]'
-p101
-g82
+p91
+g74
sS'y1p'
-p102
+p92
g7
sS'r'
-p103
+p93
g4
sS'seed4'
-p104
+p94
g2
sS'seed5'
-p105
+p95
g2
sS'B[j+1-1]'
-p106
+p96
g7
sS'model.evtin'
-p107
+p97
g7
sS'y21'
-p108
+p98
g4
sS'menu_t'
-p109
+p99
g2
sS'menu_r'
-p110
+p100
g2
sS'PO'
-p111
+p101
g7
sS'x22'
-p112
+p102
g4
sS'C'
-p113
+p103
g2
sS'DChange'
-p114
-g13
+p104
+g11
sS'Cformat'
-p115
+p105
g4
-sS'[Xdummy,Ydummy,orpar]'
-p116
+sS'Q[i+N-1][i-1]'
+p106
g7
sS'rep'
-p117
+p107
g7
sS'ymx1'
-p118
+p108
g7
sS'xy[N-1][2-1]'
-p119
+p109
g7
sS'ipar[3-1]'
-p120
+p110
g7
sS'sTp'
-p121
+p111
g2
sS'wp'
-p122
+p112
g2
-sS'ystC'
-p123
-g4
sS'New_methhod'
-p124
+p113
g7
sS'PeridicOption'
-p125
+p114
g7
sS'Graf'
-p126
+p115
g4
sS'Q'
-p127
+p116
g7
sS'ok'
-p128
-g13
+p117
+g11
sS'ly11'
-p129
+p118
g7
sS'xy[k-1].slice()'
-p130
+p119
g2
sS'Z'
-p131
+p120
g2
sS'Cmenu'
-p132
+p121
g4
-sS'[xo,k2]'
-p133
-g7
sS'periodicoption'
-p134
+p122
g7
sS'w'
-p135
+p123
g4
sS'a.x_ticks'
-p136
-g82
+p124
+g74
sS'y2p'
-p137
+p125
g7
sS'A[j+1-1][i+2*N-1]'
-p138
+p126
g7
sS'YMN'
-p139
+p127
g7
sS'Q[i-1][i+N-1]'
-p140
+p128
g7
sS'y11'
-p141
+p129
g4
sS'x2p'
-p142
+p130
g7
sS'y12'
-p143
+p131
g4
-sS'Lx'
-p144
-g7
-sS'py'
-p145
+sS'NC'
+p132
g7
sS'xyt'
-p146
+p133
g2
sS'xo'
-p147
-g28
+p134
+g26
sS'ipar[2-1]'
-p148
-g7
-sS'[mv,nv]'
-p149
+p135
g7
sS'xc'
-p150
+p136
g7
sS'sok'
-p151
-g13
+p137
+g11
sS'offset'
-p152
+p138
g2
sS'splines.data'
-p153
+p139
g2
sS'perop'
-p154
+p140
g4
sS'xe'
-p155
+p141
g7
sS'Y'
-p156
+p142
g7
sS'xx'
-p157
+p143
g2
sS'xy'
-p158
+p144
g2
sS'btn'
-p159
+p145
g7
sS'xye'
-p160
+p146
g2
sS'xe[$+1-1]'
-p161
+p147
g7
sS'SaveExit'
-p162
-g13
+p148
+g11
sS'xp'
-p163
+p149
g7
sS'Method'
-p164
+p150
g7
sS'xt'
-p165
-g28
+p151
+g26
sS'xyo'
-p166
+p152
g2
sS'Q[i-1][i-1]'
-p167
+p153
g7
sS'ystR'
-p168
+p154
g7
sS'A[j-1][i+2*N-1]'
-p169
+p155
g7
sS'random_u_exprs2'
-p170
-g36
+p156
+g31
sS'px'
-p171
+p157
g7
-sS'[orpar,oipar,ok]'
-p172
+sS'py'
+p158
g7
sS'tok'
-p173
-g13
+p159
+g11
sS'ixy'
-p174
+p160
g2
sS'rect'
-p175
-g28
+p161
+g26
sS'NP'
-p176
+p162
g7
sS'Amp'
-p177
+p163
g2
-sS'x2'
-p178
-g4
sS'exprs[2-1]'
-p179
+p164
g7
sS'model.firing'
-p180
+p165
g7
sS'xy2'
-p181
+p166
g2
sS'B'
-p182
+p167
g7
sS'A'
-p183
-g7
-sS'[Value,TextInd]'
-p184
+p168
g7
sS'yenC'
-p185
+p169
g4
sS'N'
-p186
-g7
-sS'[this.xye]'
-p187
+p170
g7
sS'random_u_exprs'
-p188
-g36
+p171
+g31
sS'Sawt2_exprs'
-p189
-NsS'[btn,xc,yc,win,Cmenu]'
-p190
+p172
+NsS'XMX'
+p173
g7
sS'graphics'
-p191
-g82
+p174
+g74
sS'Exitm'
-p192
+p175
g4
sS'N2'
-p193
+p176
g7
sS'model.ipar'
-p194
-g28
-sS'[xyo]'
-p195
-g7
+p177
+g26
sS'Pw3'
-p196
+p178
g2
sS'f'
-p197
+p179
g7
sS'a.grid'
-p198
+p180
g2
sS'y[N-1]'
-p199
-g7
-sS'[dca,k]'
-p200
-g7
-sS'[this.xt,k2]'
-p201
-g7
-sS'[this.xy]'
-p202
+p181
g7
+sS'xy[zz-1].slice()'
+p182
+g2
sS'gr_i'
-p203
+p183
g2
sS'ipar'
-p204
+p184
g2
-sS'[rpar,ipar]'
-p205
-g7
+sS'ystC'
+p185
+g4
sS'mtd'
-p206
+p186
g7
sS'PERIODIC'
-p207
+p187
g4
sS'xmx1'
-p208
+p188
g7
sS'scam'
-p209
+p189
g4
sS'exprs[4-1]'
-p210
+p190
g4
sS'ans0'
-p211
+p191
g4
sS'ymn1'
-p212
+p192
g7
sS't1'
-p213
+p193
g4
sS'model.evtout'
-p214
+p194
g7
sS'rpar'
-p215
+p195
g2
sS'lx11'
-p216
+p196
+g7
+sS'model.out'
+p197
g7
-sS'np5'
-p217
-g2
sS'Bias3'
-p218
+p198
g2
sS'Tp3'
-p219
+p199
+g2
+sS'np5'
+p200
g2
-sS'model.out'
-p220
-g7
sS'np4'
-p221
+p201
g2
sS'rectx'
-p222
+p202
g7
sS'np1'
-p223
-g7
-sS'[X,Y,orpar]'
-p224
+p203
g7
-sS'[xy]'
-p225
+sS'Lx'
+p204
g7
+sS'x21'
+p205
+g4
sS'model.in1'
-p226
+p206
g2
sS'x[k-1]'
-p227
+p207
g2
sS'HIT'
-p228
-g13
+p208
+g11
sS'xstR'
-p229
+p209
g7
sS'xe[zz-1]'
-p230
+p210
g2
sS'A[j+1-1][i-1]'
-p231
+p211
g7
sS'sAmp2'
-p232
+p212
g2
sS'TN'
-p233
+p213
g2
sS'menus'
-p234
-g36
+p214
+g31
sS'sdelay'
-p235
+p215
g2
sS'points'
-p236
-NsS'[lhs,rhs]'
-p237
-g7
-sS'Q[i+N-1][i+N-1]'
-p238
+p216
+NsS'Q[i+N-1][i+N-1]'
+p217
g7
sS'TA'
-p239
-g28
+p218
+g26
sS'Datam'
-p240
+p219
g4
sS'model.sim'
-p241
-g36
+p220
+g31
sS'XMN'
-p242
+p221
g7
-sS'[tok,xytt]'
-p243
+sS'A[j+2-1][i+N+1-1]'
+p222
g7
sS'a.data_bounds'
-p244
+p223
g7
sS'menu_o'
-p245
+p224
g2
sS'd'
-p246
+p225
g7
sS'ye'
-p247
+p226
g7
sS'X'
-p248
-g28
-sS'[fd,SST,Sheetnames,Sheetpos]'
-p249
-g7
+p227
+g26
+sS'Zt'
+p228
+g26
sS'fd'
-p250
+p229
g7
sS'exprs[5-1]'
-p251
+p230
g4
sS'graphics.exprs'
-p252
+p231
NsS'phase'
-p253
+p232
g7
sS'ZERO_POINT'
-p254
-g13
+p233
+g11
sS'typ'
-p255
+p234
g2
sS'min5'
-p256
+p235
g2
-sS'[nD,mD]'
-p257
-g7
sS'a'
-p258
-g82
+p236
+g74
sS'mok'
-p259
-g13
+p237
+g11
sS'Orderm'
-p260
+p238
g4
sS'A[j+2-1][i+N-1]'
-p261
+p239
g7
sS'B[j-1]'
-p262
+p240
g7
sS'ly21'
-p263
+p241
g7
sS'y[zz-1]'
-p264
+p242
g2
sS'A[j+2-1][i-1]'
-p265
+p243
g7
sS'max5'
-p266
+p244
g2
sS'exprs'
-p267
-g28
+p245
+g26
sS'exprs[3-1]'
-p268
+p246
g7
sS'y[k-1]'
-p269
+p247
g2
sS'At'
-p270
-g28
+p248
+g26
sS'y'
-p271
-g7
-sS'XMX'
-p272
+p249
g7
sS'model'
-p273
-g82
+p250
+g74
sS'order'
-p274
-g7
-sS'Q[i+N-1][i-1]'
-p275
+p251
g7
s. \ No newline at end of file
diff --git a/js/Sources/CURV_f.js b/js/Sources/CURV_f.js
index 7bd33137..7a64af1d 100644
--- a/js/Sources/CURV_f.js
+++ b/js/Sources/CURV_f.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Sources/CURV_f.sci" */
function CURV_f() {
CURV_f.prototype.define = function CURV_f() {
- xx = [[0],[1],[2]];
- yy = [[-5],[5],[0]];
- rect = [0,-5,2,5];
- axisdata = [[2],[10],[2],[10]];
- ipar = [[size(xx,1)],[axisdata.slice()]];
- rpar = [[xx],[yy],[rect.slice()]];
+ var xx = [[0],[1],[2]];
+ var yy = [[-5],[5],[0]];
+ var rect = [0,-5,2,5];
+ var axisdata = [[2],[10],[2],[10]];
+ var ipar = [[size(xx,1)],[axisdata.slice()]];
+ var rpar = [[xx],[yy],[rect.slice()]];
this.model = scicos_model();
this.model.sim = new ScilabString(["intplt"]);
this.model.in1 = [];
@@ -15,7 +15,7 @@ function CURV_f() {
this.model.ipar = new ScilabDouble([size(xx,1)],[axisdata.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -30,34 +30,38 @@ function CURV_f() {
CURV_f.prototype.set = function CURV_f() {
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- rpar = this.model.rpar;
- ipar = this.model.ipar;
- n = ipar[1-1];
- xx = rpar.slice(1-1,n);
- yy = rpar.slice(n+1-1,2*n);
- gc = list(rpar.slice(2*n+1-1,2*n+4),ipar.slice(2-1,5));
+ var graphics = arg1.graphics;
+ var rpar = this.model.rpar;
+ var ipar = this.model.ipar;
+ var n = ipar[1-1];
+ var xx = rpar.slice(1-1,n);
+ var yy = rpar.slice(n+1-1,2*n);
+ var gc = list(rpar.slice(2*n+1-1,2*n+4),ipar.slice(2-1,5));
while (true) {
[ln,fun]=where()
if (!or(fun=="do_eval")) {
- [xx,yy,ok,gc] = edit_curv(xx,yy,"axy",[" "," "," "],gc);
+ var tmpvar0 = edit_curv(xx,yy,"axy",[" "," "," "],gc)
+ var xx = tmpvar0[0]
+ var yy = tmpvar0[1]
+ var ok = tmpvar0[2]
+ var gc = tmpvar0[3];
} else {
- ok = true;
+ var ok = true;
}
if (!ok) {
break;
}
- n = size(xx,"*");
+ var n = size(xx,"*");
if (or(xx.slice(2-1,n)-xx.slice(1-1,n-1)<0)) {
message("You have not defined a function");
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.sim = new ScilabString(["intplt"]);
this.model.firing = [];
- rect = gc[1-1];
+ var rect = gc[1-1];
this.model.rpar = new ScilabDouble([xx.slice()],[yy.slice()],[rect.slice()]);
- axisdata = gc[2-1];
+ var axisdata = gc[2-1];
this.model.ipar = new ScilabDouble([size(xx,"*")],[axisdata.slice()]);
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/CURV_f.pickle b/js/Sources/CURV_f.pickle
index 0c4691cd..cd8f09a6 100644
--- a/js/Sources/CURV_f.pickle
+++ b/js/Sources/CURV_f.pickle
@@ -61,38 +61,35 @@ g11
sS'rect'
p22
g11
-sS'[xx,yy,ok,gc]'
-p23
-g9
sS'ok'
-p24
+p23
S'boolean'
-p25
+p24
sS'model.blocktype'
-p26
+p25
g15
sS'xx'
-p27
+p26
g4
sS'model.dep_ut'
-p28
+p27
g11
sS'n'
-p29
+p28
g9
sS'gr_i'
-p30
+p29
g11
sS'ipar'
-p31
+p30
g4
sS'y'
-p32
+p31
g11
sS'x'
-p33
+p32
g9
sS'model'
-p34
+p33
g2
s. \ No newline at end of file
diff --git a/js/Sources/Counter.js b/js/Sources/Counter.js
index c1fd50fe..f159e9f9 100644
--- a/js/Sources/Counter.js
+++ b/js/Sources/Counter.js
@@ -13,8 +13,8 @@ function Counter() {
this.model.ipar = new ScilabDouble([this.rule],[this.maxim],[this.minim]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.minim)],[string(this.maxim)],[string(this.rule)]];
- gr_i = [];
+ var exprs = [[string(this.minim)],[string(this.maxim)],[string(this.rule)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,8 +34,8 @@ function Counter() {
this.maxim = parseFloat(arguments[0]["maxim"])
this.rule = parseFloat(arguments[0]["rule"])
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.minim,this.maxim,this.rule,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Counter")],[" "],["Integer counter generator"],[" "]],["Minimum","Maximum","Rule (1:Increment, 2:Decrement)"],list("vec",1,"vec",1,"vec",1),exprs);
diff --git a/js/Sources/FROMWSB.js b/js/Sources/FROMWSB.js
index 5f9c8d2d..31a19f1f 100644
--- a/js/Sources/FROMWSB.js
+++ b/js/Sources/FROMWSB.js
@@ -1,13 +1,13 @@
/* autogenerated from "macros/Sources/FROMWSB.sci" */
function FROMWSB() {
FROMWSB.prototype.define = function FROMWSB() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,1426,231,1.4],Title="FROMWSB",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,1426,231,1.4],Title="FROMWSB",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="FROMWS_c",graphics=scicos_graphics(orig=[260.37067,261.584],sz=[70,40],flip=true,theta=0,exprs=[["V"],["1"],["1"],["0"]],pin=[],pout=4,pein=2,peout=2,gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("fromws_c",4),in1=[],in2=[],intyp=1,out=-1,out2=-2,outtyp=-1,evtin=1,evtout=1,state=[],dstate=[],odstate=list(),rpar=[],ipar=[[1],[-31],[1],[1],[0]],opar=list(),blocktype="d",firing=0,dep_ut=[false,true],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_link(xx=[[295.37067],[295.37067],[233.23733],[233.23733],[295.37067],[295.37067]],yy=[[255.86971],[223.45067],[223.45067],[337.85067],[337.85067],[307.29829]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[1,1,1]);
scs_m_1.objs[3-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[358.9421,271.584],sz=[20,20],flip=true,theta=0,exprs="1",pin=4,pout=[],pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="output",in1=-1,in2=-2,intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[4-1] = scicos_link(xx=[[338.9421],[358.9421]],yy=[[281.584],[281.584]],id="drawlink",thick=[0,0],ct=[1,1],from=[1,1,0],to=[3,1,1]);
this.model = scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=-1,out2=-2,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list());
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([5,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -21,72 +21,72 @@ function FROMWSB() {
}
FROMWSB.prototype.set = function FROMWSB() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="FROMWS_c") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
- y = 0;
+ var newpar = list();
+ var y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (!isequalbitwise(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)||or(this.model.in2!=model_n.in2)||or(this.model.out2!=model_n.out2)||or(this.model.outtyp!=model_n.outtyp)||or(this.model.intyp!=model_n.intyp)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js
index 55c23a27..24babc3c 100644
--- a/js/Sources/FROMWS_c.js
+++ b/js/Sources/FROMWS_c.js
@@ -16,8 +16,8 @@ function FROMWS_c() {
this.model.firing = [0];
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,true];
- gr_i = [];
- exprs = [[string(this.varnam)],[string(this.Method)],[string(this.ZC)],[string(this.OutEnd)]];
+ var gr_i = [];
+ var exprs = [[string(this.varnam)],[string(this.Method)],[string(this.ZC)],[string(this.OutEnd)]];
this.x = standard_define([3.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -39,8 +39,8 @@ function FROMWS_c() {
this.ZC = parseFloat(arguments[0]["ZC"])
this.OutEnd = parseFloat(arguments[0]["OutEnd"])
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.varnam,this.Method,this.ZC,this.OutEnd,exprs] = scicos_getvalue("Set From_Workspace block parameters",["Variable name","Interpolation Method","Enable zero crossing(0:No, 1:Yes)?","Output at end(0:Zero, 1:Hold, 2:Repeat)"],list("str",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -49,25 +49,28 @@ function FROMWS_c() {
}
if (!(this.Method==0||this.Method==1||this.Method==2||this.Method==3)) {
message("Interpolation method should be chosen in [0,1,2,3]");
- ok = false;
+ var ok = false;
}
if (!(this.ZC==0||this.ZC==1)) {
message("Zero crossing should be either 0 or 1");
- ok = false;
+ var ok = false;
}
if (!(this.OutEnd==0||this.OutEnd==1||this.OutEnd==2)) {
message("Output at end option should be either 0 or 1");
- ok = false;
+ var ok = false;
}
- r = false;
- ierr = execstr("r=validvar(varnam)","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(varnam)","errcatch");
if (!r) {
message([["Invalid variable name."],["Please choose another variable name."]]);
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.ipar = new ScilabDouble([length(this.varnam)],[this._str2code[this.varnam-1]],[this.Method],[this.ZC],[this.OutEnd]);
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list([-1,-2],-1),1,1);
+ var tmpvar0 = set_io(this.model,graphics,list(),list([-1,-2],-1),1,1)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Sources/FROMWS_c.pickle b/js/Sources/FROMWS_c.pickle
index f1ee6f38..ecf91390 100644
--- a/js/Sources/FROMWS_c.pickle
+++ b/js/Sources/FROMWS_c.pickle
@@ -65,50 +65,47 @@ p18
sS'model.evtout'
p19
g14
-sS'[this.model,graphics,ok]'
+sS'model.out2'
p20
g5
-sS'model.out2'
+sS'ZC'
p21
g5
-sS'ZC'
+sS'y'
p22
-g5
-sS'model.outtyp'
-p23
-g5
+g14
sS'graphics.exprs'
-p24
+p23
NsS'model.ipar'
-p25
+p24
S'matrix'
-p26
+p25
sS'typ'
-p27
+p26
g14
sS'ok'
-p28
+p27
S'boolean'
-p29
+p28
sS'model.blocktype'
-p30
+p29
g11
sS'model.dep_ut'
-p31
+p30
g14
sS'exprs'
-p32
-g26
+p31
+g25
sS'r'
+p32
+g28
+sS'model.outtyp'
p33
-g29
-sS'y'
-p34
-g14
+g5
sS'x'
-p35
+p34
g5
sS'model'
-p36
+p35
g2
s. \ No newline at end of file
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]);
diff --git a/js/Sources/GENSIN_f.pickle b/js/Sources/GENSIN_f.pickle
index 4afed481..8787f4b9 100644
--- a/js/Sources/GENSIN_f.pickle
+++ b/js/Sources/GENSIN_f.pickle
@@ -15,75 +15,71 @@ p6
atp7
Rp8
.(dp0
-S'arg1'
+S'model.sim'
p1
-S'object'
+S'string'
p2
-sS'graphics'
+sS'model.in1'
p3
-g2
-sS'rpar'
+S'vector'
p4
-S'matrix'
+sS'ok'
p5
-sS'x.model'
+S'boolean'
p6
-NsS'model.out'
+sS'model.blocktype'
p7
-S'double'
+g2
+sS'x.graphics'
p8
-sS'model.in1'
+S'object'
p9
-S'vector'
+sS'arg1'
p10
-sS'x.graphics'
+g9
+sS'model.out2'
p11
-g2
-sS'model.sim'
+S'double'
p12
-S'string'
+sS'model.rpar'
p13
-sS'[this.model,graphics,ok]'
+S'matrix'
p14
-S'list'
+sS'rpar'
p15
-sS'model.out2'
+g14
+sS'exprs'
p16
-g8
-sS'model.rpar'
+g14
+sS'x.model'
p17
-g5
-sS'model.outtyp'
+NsS'gr_i'
p18
-g8
-sS'graphics.exprs'
+g4
+sS'model.dep_ut'
p19
-NsS'typ'
+g4
+sS'graphics.exprs'
p20
-g10
-sS'ok'
+NsS'graphics'
p21
-S'boolean'
+g9
+sS'y'
p22
-sS'model.blocktype'
+g4
+sS'x'
p23
-g13
-sS'model.dep_ut'
+g12
+sS'model'
p24
-g10
-sS'exprs'
+g9
+sS'typ'
p25
-g5
-sS'gr_i'
+g4
+sS'model.outtyp'
p26
-g10
-sS'y'
+g12
+sS'model.out'
p27
-g10
-sS'x'
-p28
-g8
-sS'model'
-p29
-g2
+g12
s. \ No newline at end of file
diff --git a/js/Sources/GENSQR_f.js b/js/Sources/GENSQR_f.js
index 2d0a4372..4c7bc406 100644
--- a/js/Sources/GENSQR_f.js
+++ b/js/Sources/GENSQR_f.js
@@ -11,8 +11,8 @@ function GENSQR_f() {
this.model.dstate = new ScilabDouble([this.Amplitude]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.Amplitude);
- gr_i = [];
+ var exprs = string(this.Amplitude);
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,11 +28,11 @@ function GENSQR_f() {
GENSQR_f.prototype.set = function GENSQR_f() {
this.Amplitude = parseFloat(arguments[0]["Amplitude"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.Amplitude,exprs] = scicos_getvalue(["Set Square generator block parameters"],["Amplitude"],list("vec",1),exprs);
diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js
index 0f2bed09..29b8af91 100644
--- a/js/Sources/GEN_SQR.js
+++ b/js/Sources/GEN_SQR.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/GEN_SQR.sci" */
function GEN_SQR() {
GEN_SQR.prototype.define = function GEN_SQR() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-176.97473,421.18646,173.61587,524.41503,827,480,0,15,827,480,755,614,1.4],Title="SuperBlock",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[["if typeof(Amin)<>typeof(Amax) then error(\'Minimum value and Maximum value must have the same type\');end"],["if and(rule<>[1;2]) then error(\'Initial Value must be 1 (for Min) or 2 (for Max)\');end"],["if Amin>Amax then error(\'Maximum value must be greater than the Minimum Value\');end"],["P=%pi/F"],[""]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-176.97473,421.18646,173.61587,524.41503,827,480,0,15,827,480,755,614,1.4],Title="SuperBlock",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[["if typeof(Amin)<>typeof(Amax) then error(\'Minimum value and Maximum value must have the same type\');end"],["if and(rule<>[1;2]) then error(\'Initial Value must be 1 (for Min) or 2 (for Max)\');end"],["if Amin>Amax then error(\'Maximum value must be greater than the Minimum Value\');end"],["P=%pi/F"],[""]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="Counter",graphics=scicos_graphics(orig=[18.229901,339.5057],sz=[60,40],flip=true,theta=0,exprs=[["1"],["2"],["rule"]],pin=[],pout=8,pein=16,peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("counter",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=1,evtout=[],state=[],dstate=0,odstate=list(),rpar=[],ipar=[[1],[2],[1]],opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[38.096074,293.82198],sz=[40,40],flip=true,theta=0,exprs="Amin",pin=[],pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(-1),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[37.378886,245.02389],sz=[40,40],flip=true,theta=0,exprs="Amax",pin=[],pout=6,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(1),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -41,12 +41,12 @@ function GEN_SQR() {
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
this.model.equations = list();
- Amin = -1;
- Amax = 1;
- rule = 1;
- F = 1;
- exprs = [sci2exp(Amin),sci2exp(Amax),sci2exp(rule),sci2exp(F)];
- gr_i = [];
+ var Amin = -1;
+ var Amax = 1;
+ var rule = 1;
+ var F = 1;
+ var exprs = [sci2exp(Amin),sci2exp(Amax),sci2exp(rule),sci2exp(F)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -63,37 +63,43 @@ function GEN_SQR() {
scicos_context.Amax = arguments[0]["scicos_context.Amax"]
scicos_context.rule = arguments[0]["scicos_context.rule"]
scicos_context.F = arguments[0]["scicos_context.F"]
- y = this.needcompile;
+ var y = this.needcompile;
arg1.model.ipar = 1;
- typ = list();
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- Btitre = "Set GEN_SQR parameters";
- Exprs0 = [["Amin"],["Amax"],["rule"],["F"]];
- Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]];
- Ss = list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1);
- scicos_context = struct();
+ var typ = list();
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var Btitre = "Set GEN_SQR parameters";
+ var Exprs0 = [["Amin"],["Amax"],["rule"],["F"]];
+ var Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]];
+ var Ss = list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1);
+ var scicos_context = struct();
this.x = arg1;
- ok = false;
+ var ok = false;
while (!ok) {
[ok,scicos_context.Amin,scicos_context.Amax,scicos_context.rule,scicos_context.F,exprs] = scicos_getvalue(Btitre,Bitems,Ss,exprs);
if (!ok) {
return;
}
- PREVAR_scicos_context = scicos_context;
- sblock = this.x.model.rpar;
- [PREVAR_scicos_context,ierr] = script2var(sblock.props.context,PREVAR_scicos_context);
+ var PREVAR_scicos_context = scicos_context;
+ var sblock = this.x.model.rpar;
+ var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context)
+ var PREVAR_scicos_context = tmpvar0[0]
+ var ierr = tmpvar0[1];
if (ierr==0) {
- [sblock,%w,needcompile2,ok] = do_eval(sblock,list());
+ var tmpvar1 = do_eval(sblock,list())
+ var sblock = tmpvar1[0]
+ %w = tmpvar1[1]
+ var needcompile2 = tmpvar1[2]
+ var ok = tmpvar1[3];
if (ok) {
- y = max(2,this.needcompile,needcompile2);
+ var y = max(2,this.needcompile,needcompile2);
this.x.graphics.exprs = exprs;
this.x.model.rpar = sblock;
break;
}
} else {
message(lasterror());
- ok = false;
+ var ok = false;
}
}
return new BasicBlock(this.x);
diff --git a/js/Sources/GEN_SQR.pickle b/js/Sources/GEN_SQR.pickle
index 5bb741f3..742ed299 100644
--- a/js/Sources/GEN_SQR.pickle
+++ b/js/Sources/GEN_SQR.pickle
@@ -27,7 +27,7 @@ sS'scs_m_1.objs[14-1]'
p3
S'double'
p4
-sS'scs_m_1.objs[1-1]'
+sS'arg1.model.ipar'
p5
g4
sS'model.dstate'
@@ -96,131 +96,125 @@ g4
sS'scs_m_1.objs[15-1]'
p29
g4
-sS'[sblock,%w,needcompile2,ok]'
-p30
-g4
sS'gr_i'
-p31
+p30
g7
sS'scs_m_1'
-p32
+p31
g4
sS'scs_m_1.objs[13-1]'
-p33
+p32
g4
sS'model.evtin'
-p34
+p33
g7
-sS'[PREVAR_scicos_context,ierr]'
-p35
-g4
sS'Amax'
-p36
+p34
g4
sS'scs_m_1.objs[2-1]'
-p37
+p35
g4
sS'model.label'
-p38
+p36
g20
sS'model.sim'
-p39
+p37
g20
sS'model.evtout'
-p40
+p38
g7
sS'model.equations'
-p41
+p39
g2
sS'scs_m_1.objs[8-1]'
-p42
+p40
g4
sS'scs_m_1.objs[10-1]'
-p43
+p41
g4
sS'F'
-p44
+p42
g4
sS'Ss'
-p45
+p43
g2
sS'Exprs0'
-p46
+p44
S'matrix'
-p47
+p45
sS'model.out2'
-p48
+p46
g4
sS'sblock'
-p49
+p47
g9
sS'model.intyp'
-p50
+p48
g4
sS'model.rpar'
-p51
+p49
g4
sS'model.nmode'
-p52
+p50
g4
sS'scs_m_1.objs[4-1]'
-p53
+p51
g4
sS'sblock.props'
-p54
+p52
g9
sS'graphics'
-p55
+p53
g9
sS'scs_m_1.objs[7-1]'
-p56
+p54
g4
sS'model.ipar'
-p57
+p55
g4
sS'typ'
-p58
+p56
g2
sS'model.outtyp'
-p59
+p57
g4
sS'Bitems'
-p60
-g47
+p58
+g45
sS'ok'
-p61
+p59
S'boolean'
-p62
+p60
sS'model.blocktype'
-p63
+p61
g20
-sS'arg1.model.ipar'
-p64
+sS'scs_m_1.objs[1-1]'
+p62
g4
sS'model.dep_ut'
-p65
+p63
g7
sS'exprs'
-p66
+p64
g7
sS'x.graphics.exprs'
-p67
+p65
NsS'PREVAR_scicos_context'
-p68
+p66
g4
sS'model.firing'
-p69
+p67
g7
sS'y'
-p70
+p68
g4
sS'x'
-p71
+p69
g4
sS'model'
-p72
+p70
g9
sS'model.state'
-p73
+p71
g7
s. \ No newline at end of file
diff --git a/js/Sources/Ground_g.js b/js/Sources/Ground_g.js
index 89bdf6a7..726a9fd1 100644
--- a/js/Sources/Ground_g.js
+++ b/js/Sources/Ground_g.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/Ground_g.sci" */
function Ground_g() {
Ground_g.prototype.define = function Ground_g() {
- C = [0];
+ var C = [0];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cstblk4_m"]), new ScilabDouble([4]));
this.model.in1 = [];
@@ -13,8 +13,8 @@ function Ground_g() {
this.model.opar = list(C);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Sources/INIMPL_f.js b/js/Sources/INIMPL_f.js
index a9cf9b9d..5a5ce339 100644
--- a/js/Sources/INIMPL_f.js
+++ b/js/Sources/INIMPL_f.js
@@ -8,13 +8,13 @@ function INIMPL_f() {
this.model.ipar = [1];
this.model.dep_ut = [false,false];
this.model.blocktype = new ScilabString(["c"]);
- mo = modelica();
+ var mo = modelica();
mo.model = "PORT";
mo.outputs = "n";
this.model.equations = new ScilabDouble([mo]);
this.prt = 1;
- exprs = "1";
- gr_i = [];
+ var exprs = "1";
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
this.x.graphics.out_implicit = ["I"];
return new ImplicitInBlock(this.x);
@@ -30,11 +30,11 @@ function INIMPL_f() {
INIMPL_f.prototype.set = function INIMPL_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","INIMPL_f")],[" "],["Implicit input port"],[" "]],"Port Number",list("vec",1),exprs);
@@ -46,8 +46,8 @@ function INIMPL_f() {
block_parameter_error(msprintf("Wrong value for \'Port Number\' parameter: %d.",this.prt),"Strictly positive integer expected.");
} else {
if (this.model.ipar!=this.prt) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.ipar = new ScilabDouble([this.prt]);
graphics.exprs = exprs;
diff --git a/js/Sources/IN_f.js b/js/Sources/IN_f.js
index 0496b565..d3779e21 100644
--- a/js/Sources/IN_f.js
+++ b/js/Sources/IN_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/IN_f.sci" */
function IN_f() {
IN_f.prototype.define = function IN_f() {
- prt = 1;
+ var prt = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["input"]);
this.model.out = new ScilabDouble([-1]);
@@ -10,8 +10,8 @@ function IN_f() {
this.model.ipar = new ScilabDouble([prt]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = sci2exp(prt);
- gr_i = [];
+ var exprs = sci2exp(prt);
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new ExplicitInBlock(this.x);
}
@@ -25,21 +25,26 @@ function IN_f() {
}
IN_f.prototype.set = function IN_f() {
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
if (size(exprs,"*")==1) {
- exprs = [[exprs[1-1]],["[-1 -2]"],["-1"]];
+ var exprs = [[exprs[1-1]],["[-1 -2]"],["-1"]];
}
while (true) {
- [ok,prt,otsz,ot,exprs] = getvalue(_("Set Input block parameters"),[[_("Port number")],[_("Outport size ([-1 -2] for inherit)")],[_("Outport Type (-1 for inherit)")]],list("vec",1,"vec",-1,"vec",1),exprs);
+ var tmpvar0 = getvalue(_("Set Input block parameters"),[[_("Port number")],[_("Outport size ([-1 -2] for inherit)")],[_("Outport Type (-1 for inherit)")]],list("vec",1,"vec",-1,"vec",1),exprs)
+ var ok = tmpvar0[0]
+ var prt = tmpvar0[1]
+ var otsz = tmpvar0[2]
+ var ot = tmpvar0[3]
+ var exprs = tmpvar0[4];
if (!ok) {
break;
}
- prt = int(prt);
+ var prt = int(prt);
if (prt<=0) {
message(_("Port number must be a positive integer"));
} else if (!isequal(size(otsz,"*"),2)) {
@@ -48,8 +53,8 @@ function IN_f() {
message(_("Outport type must be a number between 1 and 9, or -1 for inheritance."));
} else {
if (this.model.ipar!=prt) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.ipar = new ScilabDouble([prt]);
this.model.firing = [];
diff --git a/js/Sources/IN_f.pickle b/js/Sources/IN_f.pickle
index 8040ac6e..71f9181e 100644
--- a/js/Sources/IN_f.pickle
+++ b/js/Sources/IN_f.pickle
@@ -9,75 +9,72 @@ p3
atp4
Rp5
.(dp0
-S'arg1'
+S'needcompile'
p1
-S'object'
+S'double'
p2
-sS'graphics'
+sS'model.sim'
p3
-g2
-sS'prt'
+S'string'
p4
-S'double'
+sS'model.out'
p5
-sS'x.model'
-p6
g2
-sS'model.out'
+sS'model.blocktype'
+p6
+g4
+sS'prt'
p7
-g5
-sS'x.graphics'
-p8
g2
-sS'model.firing'
+sS'arg1'
+p8
+S'object'
p9
-S'vector'
+sS'model.out2'
p10
-sS'model.sim'
+g2
+sS'x.graphics'
p11
-S'string'
+g9
+sS'exprs'
p12
-sS'model.out2'
+g4
+sS'x.model'
p13
-g5
-sS'model.outtyp'
+g9
+sS'gr_i'
p14
-g5
-sS'graphics.exprs'
+S'vector'
p15
-S'matrix'
+sS'model.dep_ut'
p16
-sS'model.ipar'
+g15
+sS'graphics.exprs'
p17
-g5
-sS'typ'
+S'matrix'
p18
-g10
-sS'needcompile'
+sS'graphics'
p19
-g5
-sS'model.blocktype'
+g9
+sS'y'
p20
-g12
-sS'[ok,prt,otsz,ot,exprs]'
+g2
+sS'x'
p21
-g5
-sS'model.dep_ut'
+g2
+sS'model'
p22
-g10
-sS'exprs'
+g9
+sS'model.ipar'
p23
-g12
-sS'gr_i'
+g2
+sS'typ'
p24
-g10
-sS'y'
+g15
+sS'model.outtyp'
p25
-g5
-sS'x'
-p26
-g5
-sS'model'
-p27
g2
+sS'model.firing'
+p26
+g15
s. \ No newline at end of file
diff --git a/js/Sources/Modulo_Count.js b/js/Sources/Modulo_Count.js
index 7c161252..258f4f04 100644
--- a/js/Sources/Modulo_Count.js
+++ b/js/Sources/Modulo_Count.js
@@ -11,8 +11,8 @@ function Modulo_Count() {
this.model.ipar = new ScilabDouble([this.base]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.ini_c)],[string(this.base)]];
- gr_i = [];
+ var exprs = [[string(this.ini_c)],[string(this.base)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -30,8 +30,8 @@ function Modulo_Count() {
this.ini_c = parseFloat(arguments[0]["ini_c"])
this.base = parseFloat(arguments[0]["base"])
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.ini_c,this.base,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Modulo_Count")],[" "],["Modulo counter (0 to N counter)"],[" "]],["Initial State (zero or positive number)","Upper Limit (positive number)"],list("vec",1,"vec",1),exprs);
diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js
index c1bc6b08..f0320ae3 100644
--- a/js/Sources/PULSE_SC.js
+++ b/js/Sources/PULSE_SC.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/PULSE_SC.sci" */
function PULSE_SC() {
PULSE_SC.prototype.define = function PULSE_SC() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-162.7581,435.54369,67.607292,416.67644,827,479,0,15,827,480,715,167,1.4],Title=["SuperBlock","/home/fady/Scicos_examples/"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=10,context=[["E2=E+W/100*F"],["if (W<0 | W>100) then error(\'Width must be between 0 and 100\');end"],["if (E2 >= F) then error (\'Offset must be lower than (frequency*(1-Width/100))\'); end"]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-162.7581,435.54369,67.607292,416.67644,827,479,0,15,827,480,715,167,1.4],Title=["SuperBlock","/home/fady/Scicos_examples/"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=10,context=[["E2=E+W/100*F"],["if (W<0 | W>100) then error(\'Width must be between 0 and 100\');end"],["if (E2 >= F) then error (\'Offset must be lower than (frequency*(1-Width/100))\'); end"]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[30.801202,158.91733],sz=[40,40],flip=true,theta=0,exprs="A",pin=[],pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(1),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="Ground_g",graphics=scicos_graphics(orig=[31.534535,215.384],sz=[40,40],flip=true,theta=0,exprs=[],pin=[],pout=4,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=-1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(0),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_block(gui="SELECT_m",graphics=scicos_graphics(orig=[106.00652,186.09381],sz=[40,40],flip=true,theta=0,exprs=[["-1"],["2"],["1"]],pin=[[4],[5]],pout=11,pein=[[9],[8]],peout=[],gr_i=[],id="",in_implicit=[["E"],["E"]],out_implicit="E"),model=scicos_model(sim=list("selector_m",4),in1=[[-1],[-1]],in2=[[-2],[-2]],intyp=[[-1],[-1]],out=-1,out2=-2,outtyp=-1,evtin=[[1],[1]],evtout=[],state=[],dstate=1,odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -36,12 +36,12 @@ function PULSE_SC() {
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
this.model.equations = list();
- E = 0.1;
- W = 30;
- F = 1;
- A = 1;
- exprs = [sci2exp(E),sci2exp(W),sci2exp(F),sci2exp(A)];
- gr_i = [];
+ var E = 0.1;
+ var W = 30;
+ var F = 1;
+ var A = 1;
+ var exprs = [sci2exp(E),sci2exp(W),sci2exp(F),sci2exp(A)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -58,30 +58,36 @@ function PULSE_SC() {
scicos_context.W = arguments[0]["scicos_context.W"]
scicos_context.F = arguments[0]["scicos_context.F"]
scicos_context.A = arguments[0]["scicos_context.A"]
- y = this.needcompile;
+ var y = this.needcompile;
arg1.model.ipar = 1;
- typ = list();
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- Btitre = "Set Pulse Generator parameters";
- Exprs0 = [["E"],["W"],["F"],["A"]];
- Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]];
- Ss = list("pol",-1,"pol",-1,"pol",-1,"mat",[-1,-1]);
- scicos_context = struct();
+ var typ = list();
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var Btitre = "Set Pulse Generator parameters";
+ var Exprs0 = [["E"],["W"],["F"],["A"]];
+ var Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]];
+ var Ss = list("pol",-1,"pol",-1,"pol",-1,"mat",[-1,-1]);
+ var scicos_context = struct();
this.x = arg1;
- ok = false;
+ var ok = false;
while (!ok) {
[ok,scicos_context.E,scicos_context.W,scicos_context.F,scicos_context.A,exprs] = scicos_getvalue(Btitre,Bitems,Ss,exprs);
if (!ok) {
return;
}
- PREVAR_scicos_context = scicos_context;
- sblock = this.x.model.rpar;
- [PREVAR_scicos_context,ierr] = script2var(sblock.props.context,PREVAR_scicos_context);
+ var PREVAR_scicos_context = scicos_context;
+ var sblock = this.x.model.rpar;
+ var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context)
+ var PREVAR_scicos_context = tmpvar0[0]
+ var ierr = tmpvar0[1];
if (ierr==0) {
- [sblock,%w,needcompile2,ok] = do_eval(sblock,list());
+ var tmpvar1 = do_eval(sblock,list())
+ var sblock = tmpvar1[0]
+ %w = tmpvar1[1]
+ var needcompile2 = tmpvar1[2]
+ var ok = tmpvar1[3];
if (ok) {
- y = max(2,this.needcompile,needcompile2);
+ var y = max(2,this.needcompile,needcompile2);
this.x.graphics.exprs = exprs;
this.x.model.rpar = sblock;
break;
@@ -90,7 +96,7 @@ function PULSE_SC() {
if ((lasterror()!=[])) {
messagebox(lasterror());
}
- ok = false;
+ var ok = false;
}
}
return new BasicBlock(this.x);
diff --git a/js/Sources/PULSE_SC.pickle b/js/Sources/PULSE_SC.pickle
index addcddc0..8e427edb 100644
--- a/js/Sources/PULSE_SC.pickle
+++ b/js/Sources/PULSE_SC.pickle
@@ -27,7 +27,7 @@ sS'A'
p3
S'double'
p4
-sS'scs_m_1.objs[1-1]'
+sS'arg1.model.ipar'
p5
g4
sS'model.dstate'
@@ -84,128 +84,122 @@ g4
sS'model.opar'
p25
g2
-sS'[sblock,%w,needcompile2,ok]'
-p26
-g4
sS'gr_i'
-p27
+p26
g7
sS'scs_m_1'
-p28
+p27
g4
sS'model.evtin'
-p29
+p28
g7
-sS'[PREVAR_scicos_context,ierr]'
-p30
-g4
sS'scs_m_1.objs[2-1]'
-p31
+p29
g4
sS'model.label'
-p32
+p30
g19
sS'model.sim'
-p33
+p31
g19
sS'model.evtout'
-p34
+p32
g7
sS'model.equations'
-p35
+p33
g2
sS'scs_m_1.objs[8-1]'
-p36
+p34
g4
sS'scs_m_1.objs[10-1]'
-p37
+p35
g4
sS'F'
-p38
+p36
g4
sS'Ss'
-p39
+p37
g2
sS'Exprs0'
-p40
+p38
S'matrix'
-p41
+p39
sS'model.out2'
-p42
+p40
g4
sS'sblock'
-p43
+p41
g9
sS'model.intyp'
-p44
+p42
g4
sS'model.rpar'
-p45
+p43
g4
sS'model.nmode'
-p46
+p44
g4
sS'scs_m_1.objs[4-1]'
-p47
+p45
g4
sS'sblock.props'
-p48
+p46
g9
sS'W'
-p49
+p47
g4
sS'graphics'
-p50
+p48
g9
sS'scs_m_1.objs[7-1]'
-p51
+p49
g4
sS'model.ipar'
-p52
+p50
g4
sS'typ'
-p53
+p51
g2
sS'model.outtyp'
-p54
+p52
g4
sS'Bitems'
-p55
-g41
+p53
+g39
sS'ok'
-p56
+p54
S'boolean'
-p57
+p55
sS'model.blocktype'
-p58
+p56
g19
-sS'arg1.model.ipar'
-p59
+sS'scs_m_1.objs[1-1]'
+p57
g4
sS'model.dep_ut'
-p60
+p58
g7
sS'exprs'
-p61
+p59
g7
sS'x.graphics.exprs'
-p62
+p60
NsS'PREVAR_scicos_context'
-p63
+p61
g4
sS'model.firing'
-p64
+p62
g7
sS'y'
-p65
+p63
g4
sS'x'
-p66
+p64
g4
sS'model'
-p67
+p65
g9
sS'model.state'
-p68
+p66
g7
s. \ No newline at end of file
diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js
index a3d5ce57..625556b1 100644
--- a/js/Sources/RAMP.js
+++ b/js/Sources/RAMP.js
@@ -4,7 +4,7 @@ function RAMP() {
this.slope = 0;
this.iout = 0;
this.stt = 0;
- rpar = [[this.slope],[this.stt],[this.iout]];
+ var rpar = [[this.slope],[this.stt],[this.iout]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["ramp"]), new ScilabDouble([4]));
this.model.in1 = [];
@@ -14,8 +14,8 @@ function RAMP() {
this.model.nmode = new ScilabDouble([1]);
this.model.nzcross = new ScilabDouble([1]);
this.model.dep_ut = [false,true];
- exprs = [string(rpar)];
- gr_i = [];
+ var exprs = [string(rpar)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -35,8 +35,8 @@ function RAMP() {
this.stt = parseFloat(arguments[0]["stt"])
this.iout = parseFloat(arguments[0]["iout"])
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.slope,this.stt,this.iout,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","RAMP")],[" "],["Ramp function"],[" "]],["Slope","Start Time","Initial Value"],list("vec",1,"vec",1,"vec",1),exprs);
diff --git a/js/Sources/RAND_f.js b/js/Sources/RAND_f.js
index ed32c6ed..0d01c76d 100644
--- a/js/Sources/RAND_f.js
+++ b/js/Sources/RAND_f.js
@@ -3,8 +3,8 @@ function RAND_f() {
RAND_f.prototype.define = function RAND_f() {
this.a = 0;
this.b = 1;
- dt = 0;
- out = 1;
+ var dt = 0;
+ var out = 1;
this.flag = 0;
this.model = scicos_model();
this.model.sim = new ScilabString(["rndblk"]);
@@ -15,8 +15,8 @@ function RAND_f() {
this.model.ipar = new ScilabDouble([this.flag]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.flag)],[sci2exp(this.a.slice())],[sci2exp(this.b.slice())],[string(this.model.dstate[1-1])]];
- gr_i = [];
+ var exprs = [[string(this.flag)],[sci2exp(this.a.slice())],[sci2exp(this.b.slice())],[string(this.model.dstate[1-1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -38,14 +38,14 @@ function RAND_f() {
this.b = parseFloat(arguments[0]["b"])
this.seed_c = arguments[0]["seed_c"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==5) {
- exprs = exprs.slice(1-1,3);
+ var exprs = exprs.slice(1-1,3);
}
if (size(exprs,"*")==3) {
- exprs = [[exprs],[string(this.model.dstate[1-1])]];
+ var exprs = [[exprs],[string(this.model.dstate[1-1])]];
}
while (true) {
[ok,this.flag,this.a,this.b,this.seed_c,exprs] = scicos_getvalue([["Set Random generator block parameters"],["flag = 0 : Uniform distribution A is min and A+B max"],["flag = 1 : Normal distribution A is mean and B deviation"],[" "],["A and B must be vector with equal sizes"],["seed is the seed of random number generator (integer<2**31)"]],["flag","A","B","seed"],list("vec",1,"vec",-1,"vec","size(%2,\'*\')","vec",1),exprs);
@@ -55,7 +55,7 @@ function RAND_f() {
if (this.flag!=0&&this.flag!=1) {
message("flag must be equal to 1 or 0");
} else {
- nout = size(this.a,"*");
+ var nout = size(this.a,"*");
graphics.exprs = exprs;
this.model.out = new ScilabDouble([nout]);
this.model.ipar = new ScilabDouble([this.flag]);
diff --git a/js/Sources/RAND_m.js b/js/Sources/RAND_m.js
index e525f3cf..a874bdda 100644
--- a/js/Sources/RAND_m.js
+++ b/js/Sources/RAND_m.js
@@ -3,10 +3,10 @@ function RAND_m() {
RAND_m.prototype.define = function RAND_m() {
this.a = 0;
this.b = 1;
- dt = 0;
+ var dt = 0;
this.flag = 0;
- function_name = "rndblk_m";
- funtyp = 4;
+ var function_name = "rndblk_m";
+ var funtyp = 4;
this.model = scicos_model();
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = [];
@@ -24,8 +24,8 @@ function RAND_m() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(1)],[string(this.flag)],[sci2exp([this.a])],[sci2exp([this.b])],[sci2exp([this.model.dstate[1-1],int(rand()*(10^7-1))])]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[string(this.flag)],[sci2exp([this.a])],[sci2exp([this.b])],[sci2exp([this.model.dstate[1-1],int(rand()*(10^7-1))])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -49,8 +49,8 @@ function RAND_m() {
this.b = parseFloat(arguments[0]["b"])
this.seed_c = arguments[0]["seed_c"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==14) {
exprs[9-1] = [];
@@ -63,23 +63,26 @@ function RAND_m() {
if (this.flag!=0&&this.flag!=1) {
message("flag must be equal to 1 or 0");
} else {
- out = size(this.a);
+ var out = size(this.a);
if (this.typ==1) {
- function_name = "rndblk_m";
+ var function_name = "rndblk_m";
this.model.rpar = new ScilabDouble([real(this.a.slice())],[real(this.b.slice())]);
this.model.dstate = new ScilabDouble([this.seed_c[1-1]],[0*real(this.a.slice())]);
- ot = 1;
+ var ot = 1;
} else if (this.typ==2) {
- function_name = "rndblkz_m";
- ot = 2;
+ var function_name = "rndblkz_m";
+ var ot = 2;
this.model.rpar = new ScilabDouble([real(this.a.slice())],[imag(this.a.slice())],[real(this.b.slice())],[imag(this.b.slice())]);
this.model.dstate = new ScilabDouble([this.seed_c.slice()],[0*[[real(this.a.slice())],[imag(this.a.slice())]]]);
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([],[]),list(out,ot),1,[]);
+ var tmpvar0 = set_io(this.model,graphics,list([],[]),list(out,ot),1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([4]));
graphics.exprs = exprs;
diff --git a/js/Sources/RAND_m.pickle b/js/Sources/RAND_m.pickle
index 39f505ac..530befda 100644
--- a/js/Sources/RAND_m.pickle
+++ b/js/Sources/RAND_m.pickle
@@ -72,70 +72,67 @@ p21
sS'model.evtout'
p22
g12
-sS'[this.model,graphics,ok]'
-p23
-g8
sS'model.out2'
-p24
+p23
g8
sS'model.intyp'
-p25
+p24
g12
sS'model.rpar'
-p26
+p25
g12
sS'model.outtyp'
-p27
+p26
g8
sS'flag'
-p28
+p27
g8
sS'model.state'
-p29
+p28
g12
sS'graphics.exprs'
-p30
+p29
NsS'dt'
-p31
+p30
g8
sS'model.ipar'
-p32
+p31
g8
sS'typ'
-p33
+p32
g12
sS'a'
-p34
+p33
g8
sS'b'
-p35
+p34
g8
sS'ok'
-p36
+p35
S'boolean'
-p37
+p36
sS'model.blocktype'
-p38
+p37
g19
sS'model.dep_ut'
-p39
+p38
g12
sS'exprs'
-p40
+p39
g2
sS'gr_i'
-p41
+p40
g12
sS'y'
-p42
+p41
g12
sS'x'
-p43
+p42
g8
sS'model'
-p44
+p43
g4
sS'ot'
-p45
+p44
g8
s. \ No newline at end of file
diff --git a/js/Sources/READAU_f.js b/js/Sources/READAU_f.js
index 045fa230..c8dc3476 100644
--- a/js/Sources/READAU_f.js
+++ b/js/Sources/READAU_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Sources/READAU_f.sci" */
function READAU_f() {
READAU_f.prototype.define = function READAU_f() {
- frmt = "uc ";
- fname = "test.au";
- lunit = 0;
+ var frmt = "uc ";
+ var fname = "test.au";
+ var lunit = 0;
this.N = 20;
- M = 1;
- tmask = [];
+ var M = 1;
+ var tmask = [];
this.swap = 0;
- offset = 1;
- outmask = 1;
- ievt = 0;
- nout = size(outmask,"*");
+ var offset = 1;
+ var outmask = 1;
+ var ievt = 0;
+ var nout = size(outmask,"*");
this.model = scicos_model();
this.model.sim = list(new ScilabString(["readau"]), new ScilabDouble([2]));
this.model.out = new ScilabDouble([nout]);
@@ -20,8 +20,8 @@ function READAU_f() {
this.model.ipar = new ScilabDouble([length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[M],[this.swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[fname],[string(this.N)],[string(this.swap)]];
- gr_i = [];
+ var exprs = [[fname],[string(this.N)],[string(this.swap)]];
+ var gr_i = [];
this.x = standard_define([5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,28 +41,28 @@ function READAU_f() {
this.N = parseFloat(arguments[0]["N"])
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- out = this.model.out;
- dstate = this.model.dstate;
- ipar = this.model.ipar;
- imask = 9+ipar[1-1];
- tmask = ipar[imask-1];
- lunit = dstate[3-1];
- fname = exprs[1-1];
+ var out = this.model.out;
+ var dstate = this.model.dstate;
+ var ipar = this.model.ipar;
+ var imask = 9+ipar[1-1];
+ var tmask = ipar[imask-1];
+ var lunit = dstate[3-1];
+ var fname = exprs[1-1];
while (true) {
[ok,this.fname1,this.N,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","READAU_f")],[" "],["(Read Audio File)"],[" "],["Read is done on a binary \'.au\' file"]],["Input File Name","Buffer size","Swap Mode (0:No, 1:Yes)"],list("str",1,"vec",1,"vec",1),exprs);
- tmask1 = [];
- outmask = 1;
- frmt1 = "uc";
- M = 1;
- offset = 1;
+ var tmask1 = [];
+ var outmask = 1;
+ var frmt1 = "uc";
+ var M = 1;
+ var offset = 1;
if (!ok) {
break;
}
this.fname1 = stripblanks(this.fname1);
- frmt1 = stripblanks(frmt1);
+ var frmt1 = stripblanks(frmt1);
if (this.alreadyran&&this.fname1!=fname) {
block_parameter_error("Simulation running !!! You cannot modify Input file name","End current simulation first.");
} else if (this.fname1=="") {
@@ -74,12 +74,15 @@ function READAU_f() {
} else if (this.swap!=0&&this.swap!=1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]"));
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,[],1,1,[]);
- frmt1 = part(frmt1,1,3);
+ var tmpvar0 = check_io(this.model,graphics,[],1,1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
+ var frmt1 = part(frmt1,1,3);
if (ok) {
- ipar = [[length(this.fname1)],[this._str2code[frmt1-1]],[0],[this.N],[M],[this.swap],[offset,this._str2code[this.fname1-1]],[tmask1,outmask.slice()]];
+ var ipar = [[length(this.fname1)],[this._str2code[frmt1-1]],[0],[this.N],[M],[this.swap],[offset,this._str2code[this.fname1-1]],[tmask1,outmask.slice()]];
if (prod(size(dstate))!=(this.N*M)+3) {
- dstate = [[-1],[-1],[lunit],[zeros(this.N*M,1)]];
+ var dstate = [[-1],[-1],[lunit],[zeros(this.N*M,1)]];
}
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
diff --git a/js/Sources/READAU_f.pickle b/js/Sources/READAU_f.pickle
index efecccb8..aef1d2b2 100644
--- a/js/Sources/READAU_f.pickle
+++ b/js/Sources/READAU_f.pickle
@@ -77,61 +77,58 @@ NsS'model.sim'
p23
S'list'
p24
-sS'[this.model,graphics,ok]'
-p25
-g24
sS'M'
-p26
+p25
g12
sS'N'
-p27
+p26
g12
sS'offset'
-p28
+p27
g12
sS'model.ipar'
-p29
+p28
g4
sS'typ'
-p30
+p29
g2
sS'imask'
-p31
+p30
g12
sS'model.blocktype'
-p32
+p31
g18
sS'outmask'
-p33
+p32
g12
sS'frmt1'
-p34
+p33
g18
sS'fname1'
-p35
+p34
g12
sS'exprs'
-p36
+p35
g4
sS'gr_i'
-p37
+p36
g2
sS'ievt'
-p38
+p37
g12
sS'ipar'
-p39
+p38
g4
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g12
sS'model'
-p42
+p41
g6
sS'nout'
-p43
+p42
g12
s. \ No newline at end of file
diff --git a/js/Sources/READC_f.js b/js/Sources/READC_f.js
index 010bffb1..b7d8b64f 100644
--- a/js/Sources/READC_f.js
+++ b/js/Sources/READC_f.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/Sources/READC_f.sci" */
function READC_f() {
READC_f.prototype.define = function READC_f() {
- frmt = "d ";
- fname = "foo";
- lunit = 0;
+ var frmt = "d ";
+ var fname = "foo";
+ var lunit = 0;
this.N = 20;
this.M = 1;
- rpar = [];
- tmask = 0;
+ var rpar = [];
+ var tmask = 0;
this.swap = 0;
this.offset = 1;
this.outmask = 1;
- ievt = 0;
- nout = size(this.outmask,"*");
- ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[fname-1]],[tmask],[this.outmask]];
+ var ievt = 0;
+ var nout = size(this.outmask,"*");
+ var ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[fname-1]],[tmask],[this.outmask]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["readc"]), new ScilabDouble([2]));
this.model.out = new ScilabDouble([nout]);
@@ -24,8 +24,8 @@ function READC_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [["[]"],[sci2exp(this.outmask)],[fname],[frmt],[string(this.M)],[string(this.N)],[string(this.offset)],[string(this.swap)]];
- gr_i = [];
+ var exprs = [["[]"],[sci2exp(this.outmask)],[fname],[frmt],[string(this.M)],[string(this.N)],[string(this.offset)],[string(this.swap)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -56,16 +56,16 @@ function READC_f() {
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
this.model = this.x.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- out = this.model.out;
- dstate = this.model.dstate;
- ipar = this.model.ipar;
- imask = 9+ipar[1-1];
- tmask = ipar[imask-1];
- lunit = dstate[3-1];
- fname = exprs[3-1];
- frmt = exprs[4-1];
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var out = this.model.out;
+ var dstate = this.model.dstate;
+ var ipar = this.model.ipar;
+ var imask = 9+ipar[1-1];
+ var tmask = ipar[imask-1];
+ var lunit = dstate[3-1];
+ var fname = exprs[3-1];
+ var frmt = exprs[4-1];
while (true) {
[ok,this.tmask1,this.outmask,this.fname1,this.frmt1,this.M,this.N,this.offset,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","READC_f")],[" "],["Read from C binary file"]],["Time Record Selection","Outputs Record Selection","Input File Name","Input Format","Record Size","Buffer Size","Initial Record Index","Swap Mode (0:No, 1:Yes)"],list("vec",-1,"vec",-1,"str",1,"str",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -73,8 +73,8 @@ function READC_f() {
}
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
- fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
- nout = size(this.outmask,"*");
+ var fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
+ var nout = size(this.outmask,"*");
if (prod(size(this.tmask1))>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Time Record Selection"),"Must be a scalar or an empty matrix.");
} else if (and(this.frmt1!=fmts)) {
@@ -105,15 +105,18 @@ function READC_f() {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Initial Record Index",this.offset),"Strictly positive integer expected.");
} else {
if (this.tmask1==[]) {
- ievt = 0;
+ var ievt = 0;
this.tmask1 = 0;
- outpt = [];
+ var outpt = [];
} else {
- ievt = 1;
- outpt = 1;
+ var ievt = 1;
+ var outpt = 1;
}
- out = size(this.outmask,"*");
- [this.model,graphics,ok] = check_io(this.model,graphics,[],out,1,outpt);
+ var out = size(this.outmask,"*");
+ var tmpvar0 = check_io(this.model,graphics,[],out,1,outpt)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.frmt1 = part(this.frmt1,1,3);
if (ok) {
if (ievt==0) {
@@ -121,9 +124,9 @@ function READC_f() {
} else {
this.model.firing = new ScilabDouble([0]);
}
- ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[this.fname1-1]],[this.tmask1],[this.outmask.slice()]];
+ var ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[this.fname1-1]],[this.tmask1],[this.outmask.slice()]];
if (prod(size(dstate))!=(this.N*this.M)+3) {
- dstate = [[-1],[-1],[lunit],[zeros(this.N*this.M,1)]];
+ var dstate = [[-1],[-1],[lunit],[zeros(this.N*this.M,1)]];
}
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
diff --git a/js/Sources/READC_f.pickle b/js/Sources/READC_f.pickle
index 59baf645..4656e4f2 100644
--- a/js/Sources/READC_f.pickle
+++ b/js/Sources/READC_f.pickle
@@ -103,61 +103,58 @@ g10
sS'M'
p29
g2
-sS'[this.model,graphics,ok]'
-p30
-g27
sS'fmts'
-p31
+p30
g10
sS'N'
-p32
+p31
g2
sS'graphics'
-p33
+p32
g6
sS'model.ipar'
-p34
+p33
g4
sS'typ'
-p35
+p34
g10
sS'imask'
-p36
+p35
g2
sS'model.blocktype'
-p37
+p36
g21
sS'outmask'
-p38
+p37
g2
sS'frmt1'
-p39
+p38
g21
sS'fname1'
-p40
+p39
g2
sS'exprs'
-p41
+p40
g4
sS'gr_i'
-p42
+p41
g10
sS'ievt'
-p43
+p42
g2
sS'ipar'
-p44
+p43
g4
sS'y'
-p45
+p44
g10
sS'x'
-p46
+p45
g2
sS'model'
-p47
+p46
g6
sS'nout'
-p48
+p47
g2
s. \ No newline at end of file
diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js
index f157f3d6..d16da3a0 100644
--- a/js/Sources/RFILE_f.js
+++ b/js/Sources/RFILE_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Sources/RFILE_f.sci" */
function RFILE_f() {
RFILE_f.prototype.define = function RFILE_f() {
- out = 1;
- nout = sum(out);
- frmt = "(7(e10.3,1x))";
- fname = "foo";
- lunit = 0;
+ var out = 1;
+ var nout = sum(out);
+ var frmt = "(7(e10.3,1x))";
+ var fname = "foo";
+ var lunit = 0;
this.N = 2;
- rpar = [];
- tmask = 0;
+ var rpar = [];
+ var tmask = 0;
this.outmask = 1;
- ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]];
- dstate = [[1],[1],[lunit],[zeros((nout)*this.N,1)]];
+ var ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]];
+ var dstate = [[1],[1],[lunit],[zeros((nout)*this.N,1)]];
this.model = scicos_model();
this.model.sim = new ScilabString(["readf"]);
this.model.out = new ScilabDouble([nout]);
@@ -20,8 +20,8 @@ function RFILE_f() {
this.model.ipar = new ScilabDouble([length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp([])],[sci2exp(this.outmask)],[fname],[frmt],[string(this.N)],[sci2exp(out)]];
- gr_i = [];
+ var exprs = [[sci2exp([])],[sci2exp(this.outmask)],[fname],[frmt],[string(this.N)],[sci2exp(out)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -45,18 +45,18 @@ function RFILE_f() {
this.frmt1 = parseFloat(arguments[0]["frmt1"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
- ipar = this.model.ipar;
- ievt = ipar[3-1];
+ var dstate = this.model.dstate;
+ var ipar = this.model.ipar;
+ var ievt = ipar[3-1];
this.N = ipar[4-1];
- imask = 5+ipar[1-1]+ipar[2-1];
- tmask = ipar[imask-1];
- lunit = dstate[3-1];
- fname = exprs[3-1];
- frmt = exprs[4-1];
+ var imask = 5+ipar[1-1]+ipar[2-1];
+ var tmask = ipar[imask-1];
+ var lunit = dstate[3-1];
+ var fname = exprs[3-1];
+ var frmt = exprs[4-1];
if (size(exprs,"*")>5) {
exprs[6-1] = [];
}
@@ -67,7 +67,7 @@ function RFILE_f() {
}
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
- nout = size(this.outmask,"*");
+ var nout = size(this.outmask,"*");
if (prod(size(this.tmask1))>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Time Record Selection",strcat(string(this.tmask1.slice())," ")),"Empty matrix or scalar expected.");
} else if (this.tmask1!=[]&&this.tmask1<1) {
@@ -90,23 +90,26 @@ function RFILE_f() {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s","Outputs Record Selection",strcat(string(this.outmask.slice())," ")),"Strictly positive indexes expected.");
} else {
if (this.tmask1==[]) {
- ievt = 0;
- cout = [];
+ var ievt = 0;
+ var cout = [];
this.tmask1 = 0;
} else {
- ievt = 1;
- cout = 1;
+ var ievt = 1;
+ var cout = 1;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,[],nout,1,cout);
+ var tmpvar0 = check_io(this.model,graphics,[],nout,1,cout)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
if (ievt==0) {
this.model.firing = [];
} else {
this.model.firing = new ScilabDouble([0]);
}
- ipar = [[length(this.fname1)],[length(this.frmt1)],[ievt],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]],[this.tmask1],[this.outmask.slice()]];
+ var ipar = [[length(this.fname1)],[length(this.frmt1)],[ievt],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]],[this.tmask1],[this.outmask.slice()]];
if (prod(size(dstate))!=(nout+ievt)*this.N+3) {
- dstate = [[-1],[-1],[lunit],[zeros((nout+ievt)*this.N,1)]];
+ var dstate = [[-1],[-1],[lunit],[zeros((nout+ievt)*this.N,1)]];
}
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
diff --git a/js/Sources/RFILE_f.pickle b/js/Sources/RFILE_f.pickle
index b4b40e64..d07126d0 100644
--- a/js/Sources/RFILE_f.pickle
+++ b/js/Sources/RFILE_f.pickle
@@ -85,59 +85,55 @@ g2
sS'exprs[6-1]'
p25
g13
-sS'[this.model,graphics,ok]'
-p26
-S'list'
-p27
sS'N'
-p28
+p26
g2
sS'graphics'
-p29
+p27
g9
sS'model.ipar'
-p30
+p28
g4
sS'typ'
-p31
+p29
g13
sS'imask'
-p32
+p30
g2
sS'model.blocktype'
-p33
+p31
g7
sS'outmask'
-p34
+p32
g2
sS'frmt1'
-p35
+p33
g2
sS'fname1'
-p36
+p34
g2
sS'exprs'
-p37
+p35
g4
sS'gr_i'
-p38
+p36
g13
sS'ievt'
-p39
+p37
g2
sS'ipar'
-p40
+p38
g4
sS'y'
-p41
+p39
g13
sS'x'
-p42
+p40
g2
sS'model'
-p43
+p41
g9
sS'nout'
-p44
+p42
g2
s. \ No newline at end of file
diff --git a/js/Sources/SAWTOOTH_f.js b/js/Sources/SAWTOOTH_f.js
index 655ab346..97108a8c 100644
--- a/js/Sources/SAWTOOTH_f.js
+++ b/js/Sources/SAWTOOTH_f.js
@@ -8,8 +8,8 @@ function SAWTOOTH_f() {
this.model.dstate = new ScilabDouble([0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js
index 83914ef6..a22157bc 100644
--- a/js/Sources/STEP.js
+++ b/js/Sources/STEP.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/STEP.sci" */
function STEP() {
STEP.prototype.define = function STEP() {
- rpar = [[0],[1]];
+ var rpar = [[0],[1]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["step_func"]), new ScilabDouble([4]));
this.model.evtin = new ScilabDouble([1]);
@@ -13,8 +13,8 @@ function STEP() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [[string(1)],[string(rpar)]];
- gr_i = [];
+ var exprs = [[string(1)],[string(rpar)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,8 +34,8 @@ function STEP() {
this.in1 = arguments[0]["in1"]
this.fi = arguments[0]["fi"]
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.temps,this.in1,this.fi,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","STEP_FUNCTION")],[" "],["Step Function"],[" "]],["Step Time","Initial Value","Final Value"],list("vec",1,"vec",-1,"vec",-1),exprs);
@@ -51,20 +51,23 @@ function STEP() {
this.fi = this.fi*ones(this.in1);
} else {
block_parameter_error(msprintf("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d.",size(this.in1,"*"),size(this.fi,"*")),"Same sizes expected.");
- ok = false;
+ var ok = false;
}
}
if (ok) {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
- [this.model,graphics,ok] = check_io(this.model,graphics,[],size(this.fi,"*"),1,1);
+ var tmpvar0 = check_io(this.model,graphics,[],size(this.fi,"*"),1,1)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.firing = new ScilabDouble([this.temps]);
if (this.temps==0) {
- rpar = [[this.fi],[this.fi]];
+ var rpar = [[this.fi],[this.fi]];
} else {
- rpar = [[this.in1],[this.fi]];
+ var rpar = [[this.in1],[this.fi]];
}
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
diff --git a/js/Sources/STEP.pickle b/js/Sources/STEP.pickle
index 88072f2e..e025ae99 100644
--- a/js/Sources/STEP.pickle
+++ b/js/Sources/STEP.pickle
@@ -48,54 +48,51 @@ p13
sS'model.evtout'
p14
g8
-sS'[this.model,graphics,ok]'
-p15
-g13
sS'model.out2'
-p16
+p15
g8
sS'in1'
-p17
+p16
S'string'
-p18
+p17
sS'model.rpar'
-p19
+p18
g5
sS'model.outtyp'
-p20
+p19
g8
sS'graphics.exprs'
-p21
+p20
NsS'fi'
-p22
-g18
+p21
+g17
sS'typ'
-p23
+p22
S'vector'
-p24
+p23
sS'ok'
-p25
+p24
S'boolean'
-p26
+p25
sS'model.blocktype'
-p27
-g18
+p26
+g17
sS'model.dep_ut'
-p28
-g24
+p27
+g23
sS'exprs'
-p29
+p28
g5
sS'gr_i'
-p30
-g24
+p29
+g23
sS'y'
-p31
-g24
+p30
+g23
sS'x'
-p32
+p31
g8
sS'model'
-p33
+p32
g2
s. \ No newline at end of file
diff --git a/js/Sources/STEP_FUNCTION.js b/js/Sources/STEP_FUNCTION.js
index 74ab2e2a..8f6209f0 100644
--- a/js/Sources/STEP_FUNCTION.js
+++ b/js/Sources/STEP_FUNCTION.js
@@ -1,13 +1,13 @@
/* autogenerated from "macros/Sources/STEP_FUNCTION.sci" */
function STEP_FUNCTION() {
STEP_FUNCTION.prototype.define = function STEP_FUNCTION() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = STEP("define");
scs_m_1.objs[2-1] = OUT_f("define");
scs_m_1.objs[3-1] = scicos_link();
scs_m_1.objs[4-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,0];
graphics.sz = [40,40];
@@ -17,8 +17,8 @@ function STEP_FUNCTION() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [80,10];
graphics.sz = [20,20];
@@ -28,11 +28,11 @@ function STEP_FUNCTION() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- lnk = scs_m_1.objs[3-1];
+ var lnk = scs_m_1.objs[3-1];
lnk.from = [1,1,0];
lnk.to = [2,1,1];
scs_m_1.objs[3-1] = lnk;
- lnk = scs_m_1.objs[4-1];
+ var lnk = scs_m_1.objs[4-1];
lnk.xx = [0,20,-20,-20,20,1];
lnk.yy = [0,-20,-20,60,60,1];
lnk.ct = [5,-1];
@@ -47,7 +47,7 @@ function STEP_FUNCTION() {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -61,59 +61,59 @@ function STEP_FUNCTION() {
}
STEP_FUNCTION.prototype.set = function STEP_FUNCTION() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="STEP") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
+ var newpar = list();
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (diffobjs(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
@@ -121,8 +121,8 @@ function STEP_FUNCTION() {
}
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/SampleCLK.js b/js/Sources/SampleCLK.js
index 50026829..d77bac58 100644
--- a/js/Sources/SampleCLK.js
+++ b/js/Sources/SampleCLK.js
@@ -8,7 +8,7 @@ function SampleCLK() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(1)],[sci2exp(0)]];
+ var exprs = [[sci2exp(1)],[sci2exp(0)]];
this.x = standard_define([2,2],this.model,exprs," ");
return new BasicBlock(this.x);
}
@@ -26,9 +26,9 @@ function SampleCLK() {
this.frequ = arguments[0]["frequ"]
this.offset = arguments[0]["offset"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -36,16 +36,16 @@ function SampleCLK() {
}
if (this.frequ<0) {
message("Frequency must be a positif number");
- ok = false;
+ var ok = false;
}
if (abs(this.offset)>this.frequ) {
message("The |Offset| must be less than the Frequency");
- ok = false;
+ var ok = false;
}
if (ok) {
if (or(this.model.rpar.slice()!=[[this.frequ],[this.offset]])) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.rpar = new ScilabDouble([this.frequ],[this.offset]);
this.model.evtout = new ScilabDouble([1]);
diff --git a/js/Sources/Sigbuilder.js b/js/Sources/Sigbuilder.js
index 8dcd8461..d1fea012 100644
--- a/js/Sources/Sigbuilder.js
+++ b/js/Sources/Sigbuilder.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/Sigbuilder.sci" */
function Sigbuilder() {
Sigbuilder.prototype.define = function Sigbuilder() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Sigbuilder","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=100,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Sigbuilder","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=100,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="CURVE_c",graphics=scicos_graphics(orig=[329.63473,606.18517],sz=[40,40],flip=true,theta=0,exprs=[["3"],["[0,1,2]"],["[10,20,-30]"],["y"],["n"]],pin=[],pout=6,pein=4,peout=2,gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("curve_c",4),in1=[],in2=[],intyp=1,out=1,out2=[],outtyp=1,evtin=1,evtout=1,state=[],dstate=[],odstate=list(),rpar=[[0],[1],[2],[10],[20],[-30]],ipar=[[3],[3],[1]],opar=list(),blocktype="c",firing=0,dep_ut=[false,true],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_link(xx=[[349.63473],[349.49528]],yy=[[600.47089],[565.10704]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[3,1,1]);
scs_m_1.objs[3-1] = scicos_block(gui="CLKSPLIT_f",graphics=scicos_graphics(orig=[[349.49528],[565.10704]],sz=[0.3333333,0.3333333],flip=true,theta=0,exprs=[],pin=[],pout=[],pein=2,peout=[[8],[4]],gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="split",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[false,false,false],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -11,7 +11,7 @@ function Sigbuilder() {
scs_m_1.objs[7-1] = scicos_block(gui="CLKOUTV_f",graphics=scicos_graphics(orig=[339.49528,505.10704],sz=[20,30],flip=true,theta=0,exprs="1",pin=[],pout=[],pein=8,peout=[],gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="output",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[8-1] = scicos_link(xx=[[349.49528],[349.49528]],yy=[[565.10704],[535.10704]],id="drawlink",thick=[0,0],ct=[5,-1],from=[3,1,0],to=[7,1,1]);
this.model = scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=-1,out2=[],outtyp=1,evtin=[],evtout=1,state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list());
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -24,65 +24,65 @@ function Sigbuilder() {
return options;
}
Sigbuilder.prototype.set = function Sigbuilder() {
- ppath = list(0);
+ var ppath = list(0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="CURVE_c") {
ppath[1-1] = i;
break;
}
}
- newpar = list();
+ var newpar = list();
this.y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (diffobjs(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)||or(this.model.in2!=model_n.in2)||or(this.model.out2!=model_n.out2)||or(this.model.outtyp!=model_n.outtyp)||or(this.model.intyp!=model_n.intyp)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
@@ -91,7 +91,7 @@ function Sigbuilder() {
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/TIME_f.js b/js/Sources/TIME_f.js
index 6a4e8b94..de546604 100644
--- a/js/Sources/TIME_f.js
+++ b/js/Sources/TIME_f.js
@@ -6,7 +6,7 @@ function TIME_f() {
this.model.out = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Sources/TKSCALE.js b/js/Sources/TKSCALE.js
index cc019f9e..c91d07a2 100644
--- a/js/Sources/TKSCALE.js
+++ b/js/Sources/TKSCALE.js
@@ -11,8 +11,8 @@ function TKSCALE() {
this.model.rpar = new ScilabDouble([this.a],[this.b],[this.f]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.f)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.f)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,8 +32,8 @@ function TKSCALE() {
this.b = parseFloat(arguments[0]["b"])
this.f = parseFloat(arguments[0]["f"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
[ok,this.a,this.b,this.f,exprs] = scicos_getvalue("Set scale block parameters",["Min value","Max value","Normalization"],list("vec",1,"vec",1,"vec",1),exprs);
if (ok) {