summaryrefslogtreecommitdiff
path: root/js/Misc
diff options
context:
space:
mode:
Diffstat (limited to 'js/Misc')
-rw-r--r--js/Misc/AUTOMAT.js18
-rw-r--r--js/Misc/BACKLASH.js14
-rw-r--r--js/Misc/BOUNCE.js8
-rw-r--r--js/Misc/BOUNCEXY.js6
-rw-r--r--js/Misc/BPLATFORM.js8
-rw-r--r--js/Misc/CBLOCK.js26
-rw-r--r--js/Misc/CBLOCK4.js28
-rw-r--r--js/Misc/CONSTRAINT2_c.js8
-rw-r--r--js/Misc/CONSTRAINT_c.js16
-rw-r--r--js/Misc/DEADBAND.js20
-rw-r--r--js/Misc/DEBUG.js4
-rw-r--r--js/Misc/DIFF_f.js8
-rw-r--r--js/Misc/EDGETRIGGER.js16
-rw-r--r--js/Misc/EDGE_TRIGGER.js16
-rw-r--r--js/Misc/Extract_Activation.js14
-rw-r--r--js/Misc/HYSTHERESIS.js14
-rw-r--r--js/Misc/IMPSPLIT_f.js8
-rw-r--r--js/Misc/LOGICAL_OP.js20
-rw-r--r--js/Misc/MBLOCK.js12
-rw-r--r--js/Misc/MEMORY_f.js20
-rw-r--r--js/Misc/MPBLOCK.js12
-rw-r--r--js/Misc/PAL_f.js6
-rw-r--r--js/Misc/PENDULUM_ANIM.js8
-rw-r--r--js/Misc/RATELIMITER.js8
-rw-r--r--js/Misc/RELATIONALOP.js24
-rw-r--r--js/Misc/SPLIT_f.js6
-rw-r--r--js/Misc/SUPER_f.js10
-rw-r--r--js/Misc/TEXT_f.js6
-rw-r--r--js/Misc/c_block.js12
-rw-r--r--js/Misc/fortran_block.js12
-rw-r--r--js/Misc/func_block.js10
-rw-r--r--js/Misc/generic_block.js14
-rw-r--r--js/Misc/generic_block2.js18
-rw-r--r--js/Misc/generic_block3.js28
-rw-r--r--js/Misc/scifunc_block.js20
-rw-r--r--js/Misc/scifunc_block_m.js28
36 files changed, 253 insertions, 253 deletions
diff --git a/js/Misc/AUTOMAT.js b/js/Misc/AUTOMAT.js
index 06b0b664..22543bfd 100644
--- a/js/Misc/AUTOMAT.js
+++ b/js/Misc/AUTOMAT.js
@@ -12,14 +12,14 @@ function AUTOMAT() {
ipar = [[NMode],[this.Minitial],[NX],[this.XP],[C1],[C2]];
rpar = [this.X0];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("automat"),new ScilabDouble(10004));
+ this.model.sim = list(new ScilabString(["automat"]), new ScilabDouble([10004]));
this.model.in1 = [[2*NX+1],[2*NX+1]];
this.model.out = [[2],[2*NX]];
- this.model.state = new ScilabDouble(ones(2*NX,1));
- this.model.nzcross = new ScilabDouble(1);
- this.model.blocktype = new ScilabString("c");
- this.model.evtout = new ScilabDouble(1);
- this.model.firing = new ScilabDouble(-1);
+ this.model.state = new ScilabDouble([ones(2*NX,1)]);
+ this.model.nzcross = new ScilabDouble([1]);
+ this.model.blocktype = new ScilabString(["c"]);
+ this.model.evtout = new ScilabDouble([1]);
+ this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,true];
this.model.ipar = ipar;
this.model.rpar = rpar;
@@ -124,13 +124,13 @@ function AUTOMAT() {
if (!this.ok) {
break;
}
- this.model.nzcross = new ScilabDouble(nzcross);
- this.model.state = new ScilabDouble(ones(2*NX,1));
+ this.model.nzcross = new ScilabDouble([nzcross]);
+ this.model.state = new ScilabDouble([ones(2*NX,1)]);
graphics.gr_i[1-1][1-1] = "txt=[\'Automaton\';\'nM="+string(NMode)+",nX="+string(NX)+"\'];";
graphics.exprs = exprs;
this.x.graphics = graphics;
this.model.ipar = ipar;
- this.model.rpar = new ScilabDouble(rpar);
+ this.model.rpar = new ScilabDouble([rpar]);
this.x.model = this.model;
break;
}
diff --git a/js/Misc/BACKLASH.js b/js/Misc/BACKLASH.js
index 14d36de1..63dff8f0 100644
--- a/js/Misc/BACKLASH.js
+++ b/js/Misc/BACKLASH.js
@@ -3,12 +3,12 @@ function BACKLASH() {
BACKLASH.prototype.define = function BACKLASH() {
exprs = [["0"],["1"],["1"]];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("backlash"),new ScilabDouble(4));
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["backlash"]), new ScilabDouble([4]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
this.model.rpar = [[0],[1]];
- this.model.nzcross = new ScilabDouble(2);
- this.model.blocktype = new ScilabString("c");
+ this.model.nzcross = new ScilabDouble([2]);
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
@@ -44,9 +44,9 @@ function BACKLASH() {
rpar[1-1] = this.ini;
rpar[2-1] = this.gap;
if (this.zcr!=0) {
- this.model.nzcross = new ScilabDouble(2);
+ this.model.nzcross = new ScilabDouble([2]);
} else {
- this.model.nzcross = new ScilabDouble(0);
+ this.model.nzcross = new ScilabDouble([0]);
}
this.model.rpar = rpar;
this.x.graphics = graphics;
diff --git a/js/Misc/BOUNCE.js b/js/Misc/BOUNCE.js
index fd75dd92..59bb4eb6 100644
--- a/js/Misc/BOUNCE.js
+++ b/js/Misc/BOUNCE.js
@@ -24,14 +24,14 @@ function BOUNCE() {
state = [this.x,this.xd,this.y,this.yd];
state = transpose(state);
this.model = scicos_model();
- this.model.sim = list(new ScilabString("bounce_ball"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["bounce_ball"]), new ScilabDouble([4]));
this.model.in1 = [];
this.model.out = [[n],[n]];
this.model.state = state.slice();
this.model.rpar = [[this.rpar1],[this.rpar2],[this.walls],[this.g],[this.C]];
this.model.ipar = ipar;
- this.model.nzcross = new ScilabDouble(n*(n-1)/2+4*n);
- this.model.blocktype = new ScilabString("c");
+ this.model.nzcross = new ScilabDouble([n*(n-1)/2+4*n]);
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
exprs = [[strcat(sci2exp(this.rpar1))],[strcat(sci2exp(this.rpar2))],[strcat(sci2exp(this.walls))],[strcat(sci2exp(this.x))],[strcat(sci2exp(this.xd))],[strcat(sci2exp(this.y))],[strcat(sci2exp(this.yd))]];
gr_i = [];
@@ -119,7 +119,7 @@ function BOUNCE() {
state = [this.xt,this.xd,this.y,this.yd];
state = transpose(state);
this.model.state = state.slice();
- this.model.nzcross = new ScilabDouble(n*(n-1)/2+4*n);
+ this.model.nzcross = new ScilabDouble([n*(n-1)/2+4*n]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Misc/BOUNCEXY.js b/js/Misc/BOUNCEXY.js
index a0123d59..585da84c 100644
--- a/js/Misc/BOUNCEXY.js
+++ b/js/Misc/BOUNCEXY.js
@@ -10,11 +10,11 @@ function BOUNCEXY() {
this.ymin = 0;
this.ymax = 15;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("bouncexy"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["bouncexy"]), new ScilabDouble([4]));
this.model.in1 = [[-1],[-1]];
this.model.in2 = [[1],[1]];
this.model.intyp = [[1],[1]];
- this.model.evtin = new ScilabDouble(1);
+ this.model.evtin = new ScilabDouble([1]);
z = [];
for (i=1;i<=size(this.clrs,"*");i+=1) {
z[6*(i-1)+1-1] = 0;
@@ -27,7 +27,7 @@ function BOUNCEXY() {
this.model.dstate = z;
this.model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
this.model.ipar = [[this.win],[this.imode],[this.clrs.slice()]];
- this.model.blocktype = new ScilabString("d");
+ this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
exprs = [[strcat(sci2exp(this.clrs))],[strcat(sci2exp(this.siz))],[strcat(sci2exp(this.win))],[strcat(sci2exp(1))],[strcat(sci2exp(this.xmin))],[strcat(sci2exp(this.xmax))],[strcat(sci2exp(this.ymin))],[strcat(sci2exp(this.ymax))]];
diff --git a/js/Misc/BPLATFORM.js b/js/Misc/BPLATFORM.js
index 777abcba..54c291e7 100644
--- a/js/Misc/BPLATFORM.js
+++ b/js/Misc/BPLATFORM.js
@@ -9,12 +9,12 @@ function BPLATFORM() {
this.ymin = 0;
this.ymax = 15;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("bplatform2"),new ScilabDouble(5));
+ this.model.sim = list(new ScilabString(["bplatform2"]), new ScilabDouble([5]));
this.model.in1 = [[1],[1]];
- this.model.evtin = new ScilabDouble(1);
- this.model.dstate = new ScilabDouble(0);
+ this.model.evtin = new ScilabDouble([1]);
+ this.model.dstate = new ScilabDouble([0]);
this.model.rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- this.model.blocktype = new ScilabString("d");
+ this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
exprs = string(this.model.rpar);
gr_i = [];
diff --git a/js/Misc/CBLOCK.js b/js/Misc/CBLOCK.js
index 38cb0da0..d1c5fcf4 100644
--- a/js/Misc/CBLOCK.js
+++ b/js/Misc/CBLOCK.js
@@ -14,19 +14,19 @@ function CBLOCK() {
funam = "toto";
this.ng = 0;
this.model = scicos_model();
- this.model.sim = list(new ScilabString(" "),new ScilabDouble(2004));
- this.model.in1 = new ScilabDouble(in1);
- this.model.out = new ScilabDouble(out);
+ this.model.sim = list(new ScilabString([" "]), new ScilabDouble([2004]));
+ this.model.in1 = new ScilabDouble([in1]);
+ this.model.out = new ScilabDouble([out]);
this.model.evtin = clkin;
this.model.evtout = clkout;
this.model.state = x0;
this.model.dstate = z0;
this.model.rpar = this.rpar;
this.model.ipar = this.ipar;
- this.model.blocktype = new ScilabString(typ);
+ this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
- this.model.nzcross = new ScilabDouble(this.ng);
+ this.model.nzcross = new ScilabDouble([this.ng]);
label = list(transpose([funam,"n",sci2exp(in1),sci2exp(out),sci2exp(clkin),sci2exp(clkout),sci2exp(x0),sci2exp(0),sci2exp(z0),sci2exp(this.rpar),sci2exp(this.ipar),sci2exp(auto),"y","n"]),[]);
gr_i = [];
this.x = standard_define([4,2],this.model,label,gr_i);
@@ -134,18 +134,18 @@ function CBLOCK() {
} else {
[model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,this.ci,this.co);
if (ok) {
- this.model.sim = list(new ScilabDouble(funam),new ScilabDouble(funtyp));
- this.model.in1 = new ScilabDouble(this.i);
- this.model.out = new ScilabDouble(this.o);
- this.model.evtin = new ScilabDouble(this.ci);
- this.model.evtout = new ScilabDouble(this.co);
+ this.model.sim = list(new ScilabDouble([funam]), new ScilabDouble([funtyp]));
+ this.model.in1 = new ScilabDouble([this.i]);
+ this.model.out = new ScilabDouble([this.o]);
+ this.model.evtin = new ScilabDouble([this.ci]);
+ this.model.evtout = new ScilabDouble([this.co]);
this.model.state = this.xx;
this.model.dstate = this.z;
this.model.rpar = this.rpar;
- this.model.ipar = new ScilabDouble(this.ipar);
- this.model.firing = new ScilabDouble(this.auto0);
+ this.model.ipar = new ScilabDouble([this.ipar]);
+ this.model.firing = new ScilabDouble([this.auto0]);
this.model.dep_ut = dep_ut;
- this.model.nzcross = new ScilabDouble(this.ng);
+ this.model.nzcross = new ScilabDouble([this.ng]);
label[2-1] = tt;
this.x.model = this.model;
graphics.exprs = label;
diff --git a/js/Misc/CBLOCK4.js b/js/Misc/CBLOCK4.js
index 19fd7c5c..182deb67 100644
--- a/js/Misc/CBLOCK4.js
+++ b/js/Misc/CBLOCK4.js
@@ -3,13 +3,13 @@ function CBLOCK4() {
CBLOCK4.prototype.define = function CBLOCK4() {
funam = "toto";
this.model = scicos_model();
- this.model.sim = list(new ScilabString(" "),new ScilabDouble(2004));
- this.model.in1 = new ScilabDouble(1);
- this.model.in2 = new ScilabDouble(1);
- this.model.intyp = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString([" "]), new ScilabDouble([2004]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.in2 = new ScilabDouble([1]);
+ this.model.intyp = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
this.model.dep_ut = [true,false];
label = list([[funam],["n"],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2])],[sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]],[]);
gr_i = [];
@@ -127,16 +127,16 @@ function CBLOCK4() {
break;
}
} else {
- this.model.sim = list(new ScilabDouble(funam),new ScilabDouble(funtyp));
+ this.model.sim = list(new ScilabDouble([funam]), new ScilabDouble([funtyp]));
this.model.state = this.xx;
this.model.dstate = this.z;
- this.model.odstate = new ScilabDouble(this.oz);
+ this.model.odstate = new ScilabDouble([this.oz]);
this.model.rpar = this.rpar;
- this.model.ipar = new ScilabDouble(this.ipar);
- this.model.opar = new ScilabDouble(this.opar);
- this.model.firing = new ScilabDouble(this.auto0);
- this.model.nzcross = new ScilabDouble(this.nzcr);
- this.model.nmode = new ScilabDouble(this.nmode);
+ this.model.ipar = new ScilabDouble([this.ipar]);
+ this.model.opar = new ScilabDouble([this.opar]);
+ this.model.firing = new ScilabDouble([this.auto0]);
+ this.model.nzcross = new ScilabDouble([this.nzcr]);
+ this.model.nmode = new ScilabDouble([this.nmode]);
this.model.dep_ut = dep_ut;
label[2-1] = tt;
this.x.model = this.model;
diff --git a/js/Misc/CONSTRAINT2_c.js b/js/Misc/CONSTRAINT2_c.js
index 88363986..4e80c864 100644
--- a/js/Misc/CONSTRAINT2_c.js
+++ b/js/Misc/CONSTRAINT2_c.js
@@ -5,12 +5,12 @@ function CONSTRAINT2_c() {
this.xd0 = [0];
this.id = [0];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("constraint_c"),new ScilabDouble(10004));
- this.model.in1 = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["constraint_c"]), new ScilabDouble([10004]));
+ this.model.in1 = new ScilabDouble([1]);
this.model.out = [[1],[1]];
this.model.state = [[this.x0],[this.xd0]];
this.model.ipar = this.id;
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
exprs = list(strcat(sci2exp(this.x0)),strcat(sci2exp(this.xd0)),strcat(sci2exp(this.id)));
gr_i = [];
@@ -72,7 +72,7 @@ function CONSTRAINT2_c() {
graphics.exprs = exprs;
this.model.state = [[this.x0],[this.xd0]];
this.model.out = [[N],[N]];
- this.model.in1 = new ScilabDouble(N);
+ this.model.in1 = new ScilabDouble([N]);
this.model.ipar = this.id;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Misc/CONSTRAINT_c.js b/js/Misc/CONSTRAINT_c.js
index 6a7ac07c..5eedd1cd 100644
--- a/js/Misc/CONSTRAINT_c.js
+++ b/js/Misc/CONSTRAINT_c.js
@@ -3,12 +3,12 @@ function CONSTRAINT_c() {
CONSTRAINT_c.prototype.define = function CONSTRAINT_c() {
this.x0 = [[0],[0]];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("constraint_c"),new ScilabDouble(10004));
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
- this.model.ipar = new ScilabDouble(0);
+ this.model.sim = list(new ScilabString(["constraint_c"]), new ScilabDouble([10004]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.ipar = new ScilabDouble([0]);
this.model.state = this.x0;
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
exprs = "0";
gr_i = [];
@@ -43,9 +43,9 @@ function CONSTRAINT_c() {
if (ok) {
graphics.exprs = exprs;
this.model.state = [[this.x0],[zeros(N,1)]];
- this.model.out = new ScilabDouble(N);
- this.model.in1 = new ScilabDouble(N);
- this.model.ipar = new ScilabDouble(-1*ones(N,1));
+ this.model.out = new ScilabDouble([N]);
+ this.model.in1 = new ScilabDouble([N]);
+ this.model.ipar = new ScilabDouble([-1*ones(N,1)]);
this.x.graphics = graphics;
this.x.model = this.model;
break;
diff --git a/js/Misc/DEADBAND.js b/js/Misc/DEADBAND.js
index 7d1dd640..9bcc5fe4 100644
--- a/js/Misc/DEADBAND.js
+++ b/js/Misc/DEADBAND.js
@@ -5,13 +5,13 @@ function DEADBAND() {
this.maxp = .5;
rpar = [[this.maxp],[this.minp]];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("deadband"),new ScilabDouble(4));
- this.model.in1 = new ScilabDouble(1);
- this.model.nzcross = new ScilabDouble(2);
- this.model.nmode = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["deadband"]), new ScilabDouble([4]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.nzcross = new ScilabDouble([2]);
+ this.model.nmode = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
this.model.rpar = rpar;
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
exprs = [[string(this.maxp)],[string(this.minp)],[string(this.model.nmode)]];
gr_i = [];
@@ -48,11 +48,11 @@ function DEADBAND() {
rpar = [[this.maxp],[this.minp]];
this.model.rpar = rpar;
if (this.zeroc!=0) {
- this.model.nzcross = new ScilabDouble(2);
- this.model.nmode = new ScilabDouble(1);
+ this.model.nzcross = new ScilabDouble([2]);
+ this.model.nmode = new ScilabDouble([1]);
} else {
- this.model.nzcross = new ScilabDouble(0);
- this.model.nmode = new ScilabDouble(0);
+ this.model.nzcross = new ScilabDouble([0]);
+ this.model.nmode = new ScilabDouble([0]);
}
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Misc/DEBUG.js b/js/Misc/DEBUG.js
index a8f8c683..9352edb5 100644
--- a/js/Misc/DEBUG.js
+++ b/js/Misc/DEBUG.js
@@ -2,8 +2,8 @@
function DEBUG() {
DEBUG.prototype.define = function DEBUG() {
this.model = scicos_model();
- this.model.sim = list(new ScilabString("%debug_scicos"),new ScilabDouble(99));
- this.model.blocktype = new ScilabString("d");
+ this.model.sim = list(new ScilabString(["%debug_scicos"]), new ScilabDouble([99]));
+ this.model.blocktype = new ScilabString(["d"]);
exprs = list("","xcos_debug_gui(flag,block);");
gr_i = [];
this.x = standard_define([8,2],this.model,exprs,gr_i);
diff --git a/js/Misc/DIFF_f.js b/js/Misc/DIFF_f.js
index 4d8c219c..706cdc93 100644
--- a/js/Misc/DIFF_f.js
+++ b/js/Misc/DIFF_f.js
@@ -3,11 +3,11 @@ function DIFF_f() {
DIFF_f.prototype.define = function DIFF_f() {
this.x0 = [[0],[0]];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("diffblk"),new ScilabDouble(10001));
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["diffblk"]), new ScilabDouble([10001]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
this.model.state = this.x0;
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
gr_i = [];
diff --git a/js/Misc/EDGETRIGGER.js b/js/Misc/EDGETRIGGER.js
index 5ecdcb0a..54bc5ecf 100644
--- a/js/Misc/EDGETRIGGER.js
+++ b/js/Misc/EDGETRIGGER.js
@@ -3,13 +3,13 @@ function EDGETRIGGER() {
EDGETRIGGER.prototype.define = function EDGETRIGGER() {
this.edge = 1;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("edgetrig"),new ScilabDouble(4));
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
- this.model.dstate = new ScilabDouble(0);
- this.model.nzcross = new ScilabDouble(1);
- this.model.ipar = new ScilabDouble(sign(this.edge));
- this.model.blocktype = new ScilabString("c");
+ this.model.sim = list(new ScilabString(["edgetrig"]), new ScilabDouble([4]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.dstate = new ScilabDouble([0]);
+ this.model.nzcross = new ScilabDouble([1]);
+ this.model.ipar = new ScilabDouble([sign(this.edge)]);
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
exprs = [string(this.edge)];
gr_i = [];
@@ -36,7 +36,7 @@ function EDGETRIGGER() {
if (!ok) {
break;
}
- this.model.ipar = new ScilabDouble(sign(this.edge));
+ this.model.ipar = new ScilabDouble([sign(this.edge)]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Misc/EDGE_TRIGGER.js b/js/Misc/EDGE_TRIGGER.js
index 655cd0a4..63163874 100644
--- a/js/Misc/EDGE_TRIGGER.js
+++ b/js/Misc/EDGE_TRIGGER.js
@@ -15,7 +15,7 @@ function EDGE_TRIGGER() {
graphics.orig = [60,0];
graphics.sz = [60,40];
graphics.exprs = "0";
- this.model.ipar = new ScilabDouble(0);
+ this.model.ipar = new ScilabDouble([0]);
graphics.pin = 5;
graphics.pout = 6;
blk.graphics = graphics;
@@ -28,8 +28,8 @@ function EDGE_TRIGGER() {
graphics.sz = [60,40];
graphics.exprs = [["0"],["0"]];
this.model.evtin = [];
- this.model.nzcross = new ScilabDouble(0);
- this.model.nmode = new ScilabDouble(0);
+ this.model.nzcross = new ScilabDouble([0]);
+ this.model.nmode = new ScilabDouble([0]);
graphics.pin = 6;
graphics.peout = [[7],[0]];
blk.graphics = graphics;
@@ -41,7 +41,7 @@ function EDGE_TRIGGER() {
graphics.orig = [0,10];
graphics.sz = [20,20];
graphics.exprs = ["1"];
- this.model.ipar = new ScilabDouble(1);
+ this.model.ipar = new ScilabDouble([1]);
graphics.pout = 5;
blk.graphics = graphics;
blk.model = this.model;
@@ -52,7 +52,7 @@ function EDGE_TRIGGER() {
graphics.orig = [170,-60];
graphics.sz = [20,20];
graphics.exprs = ["1"];
- this.model.ipar = new ScilabDouble(1);
+ this.model.ipar = new ScilabDouble([1]);
graphics.pein = 7;
blk.graphics = graphics;
blk.model = this.model;
@@ -73,9 +73,9 @@ function EDGE_TRIGGER() {
blk={};
lnk={};
this.model = scicos_model();
- this.model.sim = new ScilabString("csuper");
- this.model.in1 = new ScilabDouble(1);
- this.model.evtout = new ScilabDouble(1);
+ this.model.sim = new ScilabString(["csuper"]);
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.evtout = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
diff --git a/js/Misc/Extract_Activation.js b/js/Misc/Extract_Activation.js
index 50fee2cd..d8fcaa48 100644
--- a/js/Misc/Extract_Activation.js
+++ b/js/Misc/Extract_Activation.js
@@ -17,8 +17,8 @@ function Extract_Activation() {
graphics.sz = [60,40];
graphics.exprs = [["0"],["0"]];
this.model.evtin = [];
- this.model.nzcross = new ScilabDouble(0);
- this.model.nmode = new ScilabDouble(0);
+ this.model.nzcross = new ScilabDouble([0]);
+ this.model.nmode = new ScilabDouble([0]);
graphics.pin = 7;
graphics.peout = [[5],[6]];
blk.graphics = graphics;
@@ -40,7 +40,7 @@ function Extract_Activation() {
graphics.orig = [0,10];
graphics.sz = [20,20];
graphics.exprs = ["1"];
- this.model.ipar = new ScilabDouble(1);
+ this.model.ipar = new ScilabDouble([1]);
graphics.pout = 7;
blk.graphics = graphics;
blk.model = this.model;
@@ -51,7 +51,7 @@ function Extract_Activation() {
graphics.orig = [110,-140];
graphics.sz = [20,20];
graphics.exprs = ["1"];
- this.model.ipar = new ScilabDouble(1);
+ this.model.ipar = new ScilabDouble([1]);
graphics.pein = 8;
blk.graphics = graphics;
blk.model = this.model;
@@ -78,9 +78,9 @@ function Extract_Activation() {
blk={};
lnk={};
this.model = scicos_model();
- this.model.sim = new ScilabString("csuper");
- this.model.in1 = new ScilabDouble(1);
- this.model.evtout = new ScilabDouble(1);
+ this.model.sim = new ScilabString(["csuper"]);
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.evtout = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
diff --git a/js/Misc/HYSTHERESIS.js b/js/Misc/HYSTHERESIS.js
index 2f0a6d56..b4e1421b 100644
--- a/js/Misc/HYSTHERESIS.js
+++ b/js/Misc/HYSTHERESIS.js
@@ -6,13 +6,13 @@ function HYSTHERESIS() {
this.nzz = 2;
rpar = [[1],[0],[1],[0]];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("hystheresis"),new ScilabDouble(4));
- this.model.in1 = new ScilabDouble(in1);
- this.model.out = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["hystheresis"]), new ScilabDouble([4]));
+ this.model.in1 = new ScilabDouble([in1]);
+ this.model.out = new ScilabDouble([1]);
this.model.rpar = rpar;
- this.model.nzcross = new ScilabDouble(this.nzz);
- this.model.nmode = new ScilabDouble(1);
- this.model.blocktype = new ScilabString("c");
+ this.model.nzcross = new ScilabDouble([this.nzz]);
+ this.model.nmode = new ScilabDouble([1]);
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
exprs = [[string(rpar)],[string(sign(this.nzz))]];
gr_i = [];
@@ -55,7 +55,7 @@ function HYSTHERESIS() {
if (this.nzz>0) {
this.nzz = 2;
}
- this.model.nzcross = new ScilabDouble(this.nzz);
+ this.model.nzcross = new ScilabDouble([this.nzz]);
this.x.graphics = graphics;
this.x.model = this.model;
break;
diff --git a/js/Misc/IMPSPLIT_f.js b/js/Misc/IMPSPLIT_f.js
index 029257a9..f9c8121b 100644
--- a/js/Misc/IMPSPLIT_f.js
+++ b/js/Misc/IMPSPLIT_f.js
@@ -2,14 +2,14 @@
function IMPSPLIT_f() {
IMPSPLIT_f.prototype.define = function IMPSPLIT_f() {
this.model = scicos_model();
- this.model.sim = new ScilabString("limpsplit");
+ this.model.sim = new ScilabString(["limpsplit"]);
mo = modelica();
mo.model = "limpsplit";
mo.inputs = "n";
mo.outputs = [["n"],["n"]];
- this.model.equations = new ScilabDouble(mo);
- this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"*"),1));
- this.model.out = new ScilabDouble(ones(size(mo.outputs,"*"),1));
+ this.model.equations = new ScilabDouble([mo]);
+ this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
+ this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
this.x = standard_define([1,1]/3,this.model,[],[]);
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I","I"];
diff --git a/js/Misc/LOGICAL_OP.js b/js/Misc/LOGICAL_OP.js
index 05bef006..1fc868cd 100644
--- a/js/Misc/LOGICAL_OP.js
+++ b/js/Misc/LOGICAL_OP.js
@@ -5,11 +5,11 @@ function LOGICAL_OP() {
ipar = [0];
this.nin = 2;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("logicalop"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["logicalop"]), new ScilabDouble([4]));
this.model.in1 = in1;
- this.model.out = new ScilabDouble(-1);
+ this.model.out = new ScilabDouble([-1]);
this.model.ipar = ipar;
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
exprs = [[string(this.nin)],[string(ipar)]];
gr_i = [];
@@ -66,21 +66,21 @@ function LOGICAL_OP() {
this.tp = 1;
}
if (this.Datatype==1) {
- this.model.sim = list(new ScilabString("logicalop"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["logicalop"]), new ScilabDouble([4]));
this.model.ipar = [this.rule];
} else {
if (this.Datatype==3) {
- this.model.sim = list(new ScilabString("logicalop_i32"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["logicalop_i32"]), new ScilabDouble([4]));
} else if (this.Datatype==4) {
- this.model.sim = list(new ScilabString("logicalop_i16"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["logicalop_i16"]), new ScilabDouble([4]));
} else if (this.Datatype==5) {
- this.model.sim = list(new ScilabString("logicalop_i8"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["logicalop_i8"]), new ScilabDouble([4]));
} else if (this.Datatype==6) {
- this.model.sim = list(new ScilabString("logicalop_ui32"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["logicalop_ui32"]), new ScilabDouble([4]));
} else if (this.Datatype==7) {
- this.model.sim = list(new ScilabString("logicalop_ui16"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["logicalop_ui16"]), new ScilabDouble([4]));
} else if (this.Datatype==8) {
- this.model.sim = list(new ScilabString("logicalop_ui8"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["logicalop_ui8"]), new ScilabDouble([4]));
} else {
message("Datatype is not supported");
ok = false;
diff --git a/js/Misc/MBLOCK.js b/js/Misc/MBLOCK.js
index fc1311ce..aa14318e 100644
--- a/js/Misc/MBLOCK.js
+++ b/js/Misc/MBLOCK.js
@@ -11,7 +11,7 @@ function MBLOCK() {
nameF = "generic";
exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(this.pprop.slice()),nameF,[]);
this.model = scicos_model();
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
this.model.rpar = [];
for (i=1;i<=lstsize(paramv);i+=1) {
@@ -20,11 +20,11 @@ function MBLOCK() {
mo = modelica();
mo.model = nameF;
mo.parameters = list(param,paramv);
- this.model.sim = list(new ScilabString(mo.model),new ScilabDouble(30004));
+ this.model.sim = list(new ScilabString([mo.model]), new ScilabDouble([30004]));
mo.inputs = this.in1;
mo.outputs = this.out;
- this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"r"),1));
- this.model.out = new ScilabDouble(ones(size(mo.outputs,"r"),1));
+ this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"r"),1)]);
+ this.model.out = new ScilabDouble([ones(size(mo.outputs,"r"),1)]);
this.model.equations = mo;
gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
@@ -254,12 +254,12 @@ function MBLOCK() {
} else {
mo.parameters = list(transpose(param),paramv);
}
- this.model.equations = new ScilabDouble(mo);
+ this.model.equations = new ScilabDouble([mo]);
this.model.rpar = [];
for (i=1;i<=lstsize(paramv);i+=1) {
this.model.rpar = [[this.model.rpar],[paramv[i-1].slice()]];
}
- this.model.sim[1] = new ScilabDouble(this.funam);
+ this.model.sim[1] = new ScilabDouble([this.funam]);
exprs.in1 = this.lab_1[1-1];
exprs.intype = this.lab_1[2-1];
exprs.out = this.lab_1[3-1];
diff --git a/js/Misc/MEMORY_f.js b/js/Misc/MEMORY_f.js
index 796c5f41..a69822d5 100644
--- a/js/Misc/MEMORY_f.js
+++ b/js/Misc/MEMORY_f.js
@@ -5,13 +5,13 @@ function MEMORY_f() {
in1 = 1;
exprs = [[string(z)],[string(1)]];
this.model = scicos_model();
- this.model.sim = new ScilabString("memo");
- this.model.in1 = new ScilabDouble(in1);
- this.model.out = new ScilabDouble(in1);
- this.model.evtin = new ScilabDouble(1);
- this.model.dstate = new ScilabDouble(0);
- this.model.rpar = new ScilabDouble(z);
- this.model.blocktype = new ScilabString("m");
+ this.model.sim = new ScilabString(["memo"]);
+ this.model.in1 = new ScilabDouble([in1]);
+ this.model.out = new ScilabDouble([in1]);
+ this.model.evtin = new ScilabDouble([1]);
+ this.model.dstate = new ScilabDouble([0]);
+ this.model.rpar = new ScilabDouble([z]);
+ this.model.blocktype = new ScilabString(["m"]);
this.model.dep_ut = [false,false];
gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
@@ -53,9 +53,9 @@ function MEMORY_f() {
in1 = out;
if (ok) {
graphics.exprs = exprs;
- this.model.rpar = new ScilabDouble(this.a);
- this.model.in1 = new ScilabDouble(in1);
- this.model.out = new ScilabDouble(out);
+ this.model.rpar = new ScilabDouble([this.a]);
+ this.model.in1 = new ScilabDouble([in1]);
+ this.model.out = new ScilabDouble([out]);
this.x.graphics = graphics;
this.x.model = this.model;
break;
diff --git a/js/Misc/MPBLOCK.js b/js/Misc/MPBLOCK.js
index 509c0db0..c09db580 100644
--- a/js/Misc/MPBLOCK.js
+++ b/js/Misc/MPBLOCK.js
@@ -11,7 +11,7 @@ function MPBLOCK() {
nameF = "myModel";
exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(pprop.slice()),nameF,[]);
this.model = scicos_model();
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,true];
this.model.rpar = [];
for (i=1;i<=lstsize(paramv);i+=1) {
@@ -20,11 +20,11 @@ function MPBLOCK() {
mo = modelica();
mo.model = nameF;
mo.parameters = list(param,paramv);
- this.model.sim = list(new ScilabString(mo.model),new ScilabDouble(10004));
+ this.model.sim = list(new ScilabString([mo.model]), new ScilabDouble([10004]));
mo.inputs = this.in1;
mo.outputs = this.out;
- this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"r"),1));
- this.model.out = new ScilabDouble(ones(size(mo.outputs,"r"),1));
+ this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"r"),1)]);
+ this.model.out = new ScilabDouble([ones(size(mo.outputs,"r"),1)]);
this.model.equations = mo;
gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
@@ -231,12 +231,12 @@ function MPBLOCK() {
mo.parameters = list(transpose(param),paramv);
}
}
- this.model.equations = new ScilabDouble(mo);
+ this.model.equations = new ScilabDouble([mo]);
this.model.rpar = [];
for (i=1;i<=lstsize(paramv);i+=1) {
this.model.rpar = [[this.model.rpar],[double(paramv[i-1].slice())]];
}
- this.model.sim[1] = new ScilabDouble(this.funam);
+ this.model.sim[1] = new ScilabDouble([this.funam]);
exprs.in1 = lab_1[1-1];
exprs.intype = lab_1[2-1];
exprs.out = lab_1[3-1];
diff --git a/js/Misc/PAL_f.js b/js/Misc/PAL_f.js
index 4b4f51bb..c06c86e8 100644
--- a/js/Misc/PAL_f.js
+++ b/js/Misc/PAL_f.js
@@ -4,11 +4,11 @@ function PAL_f() {
scs = scicos_diagram();
scs.props.title = "Palette";
this.model = scicos_model();
- this.model.sim = new ScilabString("palette");
+ this.model.sim = new ScilabString(["palette"]);
this.model.in1 = [];
this.model.out = [];
- this.model.rpar = new ScilabDouble(scs);
- this.model.blocktype = new ScilabString("h");
+ this.model.rpar = new ScilabDouble([scs]);
+ this.model.blocktype = new ScilabString(["h"]);
this.model.dep_ut = [false,false];
gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
diff --git a/js/Misc/PENDULUM_ANIM.js b/js/Misc/PENDULUM_ANIM.js
index 456ca1ef..a3afd769 100644
--- a/js/Misc/PENDULUM_ANIM.js
+++ b/js/Misc/PENDULUM_ANIM.js
@@ -9,12 +9,12 @@ function PENDULUM_ANIM() {
this.ymin = -5;
this.ymax = 5;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("anim_pen"),new ScilabDouble(5));
+ this.model.sim = list(new ScilabString(["anim_pen"]), new ScilabDouble([5]));
this.model.in1 = [[1],[1]];
- this.model.evtin = new ScilabDouble(1);
- this.model.dstate = new ScilabDouble(0);
+ this.model.evtin = new ScilabDouble([1]);
+ this.model.dstate = new ScilabDouble([0]);
this.model.rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- this.model.blocktype = new ScilabString("d");
+ this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
exprs = string(this.model.rpar);
gr_i = [];
diff --git a/js/Misc/RATELIMITER.js b/js/Misc/RATELIMITER.js
index ba4a5958..da98d1ec 100644
--- a/js/Misc/RATELIMITER.js
+++ b/js/Misc/RATELIMITER.js
@@ -5,11 +5,11 @@ function RATELIMITER() {
this.maxp = 1;
rpar = [[this.maxp],[this.minp]];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("ratelimiter"),new ScilabDouble(4));
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["ratelimiter"]), new ScilabDouble([4]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
this.model.rpar = rpar;
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
exprs = [[string(this.maxp)],[string(this.minp)]];
gr_i = [];
diff --git a/js/Misc/RELATIONALOP.js b/js/Misc/RELATIONALOP.js
index a98b7e5d..7782c82f 100644
--- a/js/Misc/RELATIONALOP.js
+++ b/js/Misc/RELATIONALOP.js
@@ -4,11 +4,11 @@ function RELATIONALOP() {
ipar = [2];
label = "&lt";
this.model = scicos_model();
- this.model.sim = list(new ScilabString("relationalop"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["relationalop"]), new ScilabDouble([4]));
this.model.in1 = [[1],[1]];
- this.model.out = new ScilabDouble(1);
+ this.model.out = new ScilabDouble([1]);
this.model.ipar = ipar;
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
exprs = [[string(ipar)],[string(0)]];
gr_i = [];
@@ -52,19 +52,19 @@ function RELATIONALOP() {
ok = false;
}
if ((this.Datatype==1)) {
- this.model.sim = list(new ScilabString("relational_op"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["relational_op"]), new ScilabDouble([4]));
} else if ((this.Datatype==3||this.Datatype==9)) {
- this.model.sim = list(new ScilabString("relational_op_i32"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["relational_op_i32"]), new ScilabDouble([4]));
} else if ((this.Datatype==4)) {
- this.model.sim = list(new ScilabString("relational_op_i16"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["relational_op_i16"]), new ScilabDouble([4]));
} else if ((this.Datatype==5)) {
- this.model.sim = list(new ScilabString("relational_op_i8"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["relational_op_i8"]), new ScilabDouble([4]));
} else if ((this.Datatype==6)) {
- this.model.sim = list(new ScilabString("relational_op_ui32"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["relational_op_ui32"]), new ScilabDouble([4]));
} else if ((this.Datatype==7)) {
- this.model.sim = list(new ScilabString("relational_op_ui16"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["relational_op_ui16"]), new ScilabDouble([4]));
} else if ((this.Datatype==8)) {
- this.model.sim = list(new ScilabString("relational_op_ui8"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["relational_op_ui8"]), new ScilabDouble([4]));
} else {
message("Datatype is not supported");
ok = false;
@@ -93,8 +93,8 @@ function RELATIONALOP() {
graphics.exprs = exprs;
graphics.style = ["fontSize=13;fontStyle=1;displayedLabel="+label];
this.model.ipar = [this.rule];
- this.model.nzcross = new ScilabDouble(this.zcr);
- this.model.nmode = new ScilabDouble(this.zcr);
+ this.model.nzcross = new ScilabDouble([this.zcr]);
+ this.model.nmode = new ScilabDouble([this.zcr]);
this.x.graphics = graphics;
this.x.model = this.model;
break;
diff --git a/js/Misc/SPLIT_f.js b/js/Misc/SPLIT_f.js
index 5cd7069b..2a0adf1a 100644
--- a/js/Misc/SPLIT_f.js
+++ b/js/Misc/SPLIT_f.js
@@ -2,10 +2,10 @@
function SPLIT_f() {
SPLIT_f.prototype.define = function SPLIT_f() {
this.model = scicos_model();
- this.model.sim = new ScilabString("lsplit");
- this.model.in1 = new ScilabDouble(-1);
+ this.model.sim = new ScilabString(["lsplit"]);
+ this.model.in1 = new ScilabDouble([-1]);
this.model.out = [[-1],[-1],[-1]];
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
this.x = standard_define([1,1]/3,this.model,[],[]);
return new BasicBlock(this.x);
diff --git a/js/Misc/SUPER_f.js b/js/Misc/SUPER_f.js
index 0643d0d6..2064ceb8 100644
--- a/js/Misc/SUPER_f.js
+++ b/js/Misc/SUPER_f.js
@@ -12,11 +12,11 @@ function SUPER_f() {
scs.objs[1-1] = in1;
scs.objs[2-1] = out;
this.model = scicos_model();
- this.model.sim = new ScilabString("super");
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
- this.model.rpar = new ScilabDouble(scs);
- this.model.blocktype = new ScilabString("h");
+ this.model.sim = new ScilabString(["super"]);
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.rpar = new ScilabDouble([scs]);
+ this.model.blocktype = new ScilabString(["h"]);
this.model.dep_ut = [false,false];
gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
diff --git a/js/Misc/TEXT_f.js b/js/Misc/TEXT_f.js
index 8e36e155..67b635cd 100644
--- a/js/Misc/TEXT_f.js
+++ b/js/Misc/TEXT_f.js
@@ -4,8 +4,8 @@ function TEXT_f() {
this.font = 2;
this.siz = 1;
this.model = scicos_model();
- this.model.sim = new ScilabString("text");
- this.model.rpar = new ScilabString("Text");
+ this.model.sim = new ScilabString(["text"]);
+ this.model.rpar = new ScilabString(["Text"]);
this.model.ipar = [[this.font],[this.siz]];
exprs = [["Text"],[string(this.font)],[string(this.siz)]];
graphics = scicos_graphics();
@@ -67,7 +67,7 @@ function TEXT_f() {
graphics.sz = sz;
this.x.graphics = graphics;
ipar = [[this.font],[this.siz]];
- this.model.rpar = new ScilabDouble(this.txt);
+ this.model.rpar = new ScilabDouble([this.txt]);
this.model.ipar = ipar;
this.x.model = this.model;
break;
diff --git a/js/Misc/c_block.js b/js/Misc/c_block.js
index 32685ce8..97c818c9 100644
--- a/js/Misc/c_block.js
+++ b/js/Misc/c_block.js
@@ -12,16 +12,16 @@ function c_block() {
this.rpar = [];
this.funam = "toto";
this.model = scicos_model();
- this.model.sim = list(new ScilabString(" "),new ScilabDouble(2001));
- this.model.in1 = new ScilabDouble(in1);
- this.model.out = new ScilabDouble(out);
+ this.model.sim = list(new ScilabString([" "]), new ScilabDouble([2001]));
+ this.model.in1 = new ScilabDouble([in1]);
+ this.model.out = new ScilabDouble([out]);
this.model.evtin = clkin;
this.model.evtout = clkout;
this.model.state = x0;
this.model.dstate = z0;
this.model.rpar = this.rpar;
- this.model.ipar = new ScilabDouble(0);
- this.model.blocktype = new ScilabString(typ);
+ this.model.ipar = new ScilabDouble([0]);
+ this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
label = list([[sci2exp(in1)],[sci2exp(out)],[strcat(sci2exp(this.rpar))],[this.funam]],list([]));
@@ -75,7 +75,7 @@ function c_block() {
}
[model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,[],[]);
if (ok) {
- this.model.sim[1] = new ScilabString(this.funam);
+ this.model.sim[1] = new ScilabString([this.funam]);
this.model.rpar = this.rpar;
label[2-1] = tt;
this.x.model = this.model;
diff --git a/js/Misc/fortran_block.js b/js/Misc/fortran_block.js
index 7a5ba3e3..185431a2 100644
--- a/js/Misc/fortran_block.js
+++ b/js/Misc/fortran_block.js
@@ -2,16 +2,16 @@
function fortran_block() {
fortran_block.prototype.define = function fortran_block() {
this.model = scicos_model();
- this.model.sim = list(new ScilabString(" "),new ScilabDouble(1001));
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString([" "]), new ScilabDouble([1001]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
this.model.evtin = [];
this.model.evtout = [];
this.model.state = [];
this.model.dstate = [];
this.model.rpar = [];
- this.model.ipar = new ScilabDouble(0);
- this.model.blocktype = new ScilabString("c");
+ this.model.ipar = new ScilabDouble([0]);
+ this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
this.funam = "forty";
@@ -66,7 +66,7 @@ function fortran_block() {
}
[model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,[],[]);
if (ok) {
- this.model.sim[1] = new ScilabString(this.funam);
+ this.model.sim[1] = new ScilabString([this.funam]);
this.model.rpar = this.rpar;
label[2-1] = tt;
this.x.model = this.model;
diff --git a/js/Misc/func_block.js b/js/Misc/func_block.js
index 9beb288c..52a8a30a 100644
--- a/js/Misc/func_block.js
+++ b/js/Misc/func_block.js
@@ -2,10 +2,10 @@
function func_block() {
func_block.prototype.define = function func_block() {
this.model = scicos_model();
- this.model.sim = new ScilabString(" ");
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
- this.model.blocktype = new ScilabString("c");
+ this.model.sim = new ScilabString([" "]);
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
exprs = "v=sin(u);y=u*v";
gr_i = [];
@@ -28,7 +28,7 @@ function func_block() {
this.model = this.x.model;
[ok,mac,exprs] = this.genfunc[exprs-1];
if (ok) {
- this.model.sim = new ScilabDouble(mac);
+ this.model.sim = new ScilabDouble([mac]);
graphics.exprs = exprs;
this.x.model = this.model;
this.x.graphics = graphics;
diff --git a/js/Misc/generic_block.js b/js/Misc/generic_block.js
index 075b2906..17ce3c1a 100644
--- a/js/Misc/generic_block.js
+++ b/js/Misc/generic_block.js
@@ -4,16 +4,16 @@ function generic_block() {
this.model = scicos_model();
this.function_name = "sinblk";
this.funtyp = 1;
- this.model.sim = list(new ScilabString(this.function_name),new ScilabDouble(this.funtyp));
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
this.model.evtin = [];
this.model.evtout = [];
this.model.state = [];
this.model.dstate = [];
this.model.rpar = [];
this.model.ipar = [];
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.firing)],["y"],["n"]];
@@ -110,12 +110,12 @@ function generic_block() {
if (this.funtyp==3) {
needcompile = 4;
}
- this.model.sim = list(new ScilabDouble(this.function_name),new ScilabDouble(this.funtyp));
+ this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp]));
this.model.state = this.xx;
this.model.dstate = this.z;
this.model.rpar = this.rpar;
- this.model.ipar = new ScilabDouble(this.ipar);
- this.model.firing = new ScilabDouble(this.auto0);
+ this.model.ipar = new ScilabDouble([this.ipar]);
+ this.model.firing = new ScilabDouble([this.auto0]);
this.model.dep_ut = dep_ut;
arg1.model = this.model;
graphics.exprs = label;
diff --git a/js/Misc/generic_block2.js b/js/Misc/generic_block2.js
index 55bec7e6..4e44d3df 100644
--- a/js/Misc/generic_block2.js
+++ b/js/Misc/generic_block2.js
@@ -4,16 +4,16 @@ function generic_block2() {
this.model = scicos_model();
this.function_name = "sinblk";
this.funtyp = 1;
- this.model.sim = list(new ScilabString(this.function_name),new ScilabDouble(this.funtyp));
- this.model.in1 = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
this.model.evtin = [];
this.model.evtout = [];
this.model.state = [];
this.model.dstate = [];
this.model.rpar = [];
this.model.ipar = [];
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
@@ -114,14 +114,14 @@ function generic_block2() {
if (this.funtyp==3) {
needcompile = 4;
}
- this.model.sim = list(new ScilabDouble(this.function_name),new ScilabDouble(this.funtyp));
+ this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp]));
this.model.state = this.xx;
this.model.dstate = this.z;
this.model.rpar = this.rpar;
- this.model.ipar = new ScilabDouble(this.ipar);
- this.model.firing = new ScilabDouble(this.auto0);
- this.model.nzcross = new ScilabDouble(this.nzcr);
- this.model.nmode = new ScilabDouble(this.nmode);
+ this.model.ipar = new ScilabDouble([this.ipar]);
+ this.model.firing = new ScilabDouble([this.auto0]);
+ this.model.nzcross = new ScilabDouble([this.nzcr]);
+ this.model.nmode = new ScilabDouble([this.nmode]);
this.model.dep_ut = dep_ut;
arg1.model = this.model;
graphics.exprs = label;
diff --git a/js/Misc/generic_block3.js b/js/Misc/generic_block3.js
index 22ff6155..42830ce9 100644
--- a/js/Misc/generic_block3.js
+++ b/js/Misc/generic_block3.js
@@ -4,13 +4,13 @@ function generic_block3() {
this.model = scicos_model();
this.function_name = "sinblk";
this.funtyp = 4;
- this.model.sim = list(new ScilabString(this.function_name),new ScilabDouble(this.funtyp));
- this.model.in1 = new ScilabDouble(1);
- this.model.in2 = new ScilabDouble(1);
- this.model.intyp = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ this.model.in1 = new ScilabDouble([1]);
+ this.model.in2 = new ScilabDouble([1]);
+ this.model.intyp = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
this.model.dep_ut = [true,false];
label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2]),sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
gr_i = [];
@@ -124,16 +124,16 @@ function generic_block3() {
if (this.funtyp==3) {
needcompile = 4;
}
- this.model.sim = list(new ScilabDouble(this.function_name),new ScilabDouble(this.funtyp));
+ this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp]));
this.model.state = this.xx;
this.model.dstate = this.z;
- this.model.odstate = new ScilabDouble(this.oz);
+ this.model.odstate = new ScilabDouble([this.oz]);
this.model.rpar = this.rpar;
- this.model.ipar = new ScilabDouble(this.ipar);
- this.model.opar = new ScilabDouble(this.opar);
- this.model.firing = new ScilabDouble(this.auto0);
- this.model.nzcross = new ScilabDouble(this.nzcr);
- this.model.nmode = new ScilabDouble(this.nmode);
+ this.model.ipar = new ScilabDouble([this.ipar]);
+ this.model.opar = new ScilabDouble([this.opar]);
+ this.model.firing = new ScilabDouble([this.auto0]);
+ this.model.nzcross = new ScilabDouble([this.nzcr]);
+ this.model.nmode = new ScilabDouble([this.nmode]);
this.model.dep_ut = dep_ut;
arg1.model = this.model;
graphics.exprs = label;
diff --git a/js/Misc/scifunc_block.js b/js/Misc/scifunc_block.js
index 45da6f37..a1ebbde9 100644
--- a/js/Misc/scifunc_block.js
+++ b/js/Misc/scifunc_block.js
@@ -11,17 +11,17 @@ function scifunc_block() {
auto = [];
this.rpar = [];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("scifunc"),new ScilabDouble(3));
- this.model.in1 = new ScilabDouble(in1);
- this.model.out = new ScilabDouble(out);
+ this.model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3]));
+ this.model.in1 = new ScilabDouble([in1]);
+ this.model.out = new ScilabDouble([out]);
this.model.evtin = clkin;
this.model.evtout = clkout;
this.model.state = x0;
this.model.dstate = z0;
this.model.rpar = this.rpar;
- this.model.ipar = new ScilabDouble(0);
+ this.model.ipar = new ScilabDouble([0]);
this.model.opar = list();
- this.model.blocktype = new ScilabString(typ);
+ this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
exprs = list([[sci2exp(in1)],[sci2exp(out)],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
@@ -95,15 +95,15 @@ function scifunc_block() {
this.model.dstate = this.z;
this.model.rpar = this.rpar;
if (this.model.ipar!=0) {
- this.model.opar = new ScilabDouble(this.model.ipar);
- this.model.ipar = new ScilabDouble(0);
+ this.model.opar = new ScilabDouble([this.model.ipar]);
+ this.model.ipar = new ScilabDouble([0]);
}
if (or(this.model.opar!=tt)) {
needcompile = 4;
}
- this.model.opar = new ScilabDouble(tt);
- this.model.firing = new ScilabDouble(auto);
- this.model.dep_ut = new ScilabDouble(dep_ut);
+ this.model.opar = new ScilabDouble([tt]);
+ this.model.firing = new ScilabDouble([auto]);
+ this.model.dep_ut = new ScilabDouble([dep_ut]);
this.x.model = this.model;
exprs[2-1] = tt;
graphics.exprs = exprs;
diff --git a/js/Misc/scifunc_block_m.js b/js/Misc/scifunc_block_m.js
index 924149d8..0b7d0ba1 100644
--- a/js/Misc/scifunc_block_m.js
+++ b/js/Misc/scifunc_block_m.js
@@ -12,21 +12,21 @@ function scifunc_block_m() {
this.rpar = [];
it = 1;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("scifunc"),new ScilabDouble(3));
- this.model.in1 = new ScilabDouble(in1);
- this.model.in2 = new ScilabDouble(in1);
- this.model.intyp = new ScilabDouble(it);
- this.model.out = new ScilabDouble(out);
- this.model.out2 = new ScilabDouble(out);
- this.model.outtyp = new ScilabDouble(it);
+ this.model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3]));
+ this.model.in1 = new ScilabDouble([in1]);
+ this.model.in2 = new ScilabDouble([in1]);
+ this.model.intyp = new ScilabDouble([it]);
+ this.model.out = new ScilabDouble([out]);
+ this.model.out2 = new ScilabDouble([out]);
+ this.model.outtyp = new ScilabDouble([it]);
this.model.evtin = clkin;
this.model.evtout = clkout;
this.model.state = x0;
this.model.dstate = z0;
this.model.rpar = this.rpar;
- this.model.ipar = new ScilabDouble(0);
+ this.model.ipar = new ScilabDouble([0]);
this.model.opar = list();
- this.model.blocktype = new ScilabString(typ);
+ this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
exprs = list([[sci2exp([in1,in1])],[sci2exp([out,out])],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)],[sci2exp(0)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
@@ -97,15 +97,15 @@ function scifunc_block_m() {
this.model.dstate = this.z;
this.model.rpar = this.rpar;
if (this.model.ipar!=0) {
- this.model.opar = new ScilabDouble(this.model.ipar);
- this.model.ipar = new ScilabDouble(0);
+ this.model.opar = new ScilabDouble([this.model.ipar]);
+ this.model.ipar = new ScilabDouble([0]);
}
if (or(this.model.opar!=tt)) {
needcompile = 4;
}
- this.model.opar = new ScilabDouble(tt);
- this.model.firing = new ScilabDouble(auto);
- this.model.dep_ut = new ScilabDouble(dep_ut);
+ this.model.opar = new ScilabDouble([tt]);
+ this.model.firing = new ScilabDouble([auto]);
+ this.model.dep_ut = new ScilabDouble([dep_ut]);
this.x.model = this.model;
exprs[2-1] = tt;
graphics.exprs = exprs;