summaryrefslogtreecommitdiff
path: root/js/Sources
diff options
context:
space:
mode:
authorSunil Shetye2018-07-09 18:10:31 +0530
committerSunil Shetye2018-07-10 11:24:53 +0530
commit9b18945e2e2348db85595fb096a1e1eba04f9baf (patch)
treebb13cffc501f152b1d33870bdeff6f274aecbf7b /js/Sources
parentf19304a4fe99556c5ddc35024c818d00ffe7e23a (diff)
downloadsci2js-9b18945e2e2348db85595fb096a1e1eba04f9baf.tar.gz
sci2js-9b18945e2e2348db85595fb096a1e1eba04f9baf.tar.bz2
sci2js-9b18945e2e2348db85595fb096a1e1eba04f9baf.zip
remove type from list
Diffstat (limited to 'js/Sources')
-rw-r--r--js/Sources/CLKINV_f.js16
-rw-r--r--js/Sources/CLKIN_f.js16
-rw-r--r--js/Sources/CLOCK_c.js2
-rw-r--r--js/Sources/CLOCK_f.js4
-rw-r--r--js/Sources/CONST.js10
-rw-r--r--js/Sources/CONST_f.js10
-rw-r--r--js/Sources/CONST_m.js10
-rw-r--r--js/Sources/CURV_f.js8
-rw-r--r--js/Sources/Counter.js14
-rw-r--r--js/Sources/FROMWS_c.js10
-rw-r--r--js/Sources/GENSIN_f.js14
-rw-r--r--js/Sources/GENSQR_f.js20
-rw-r--r--js/Sources/GEN_SQR.js22
-rw-r--r--js/Sources/Ground_g.js10
-rw-r--r--js/Sources/INIMPL_f.js8
-rw-r--r--js/Sources/IN_f.js20
-rw-r--r--js/Sources/Modulo_Count.js16
-rw-r--r--js/Sources/PULSE_SC.js22
-rw-r--r--js/Sources/RAMP.js10
-rw-r--r--js/Sources/RAND_f.js14
-rw-r--r--js/Sources/RAND_m.js18
-rw-r--r--js/Sources/READAU_f.js8
-rw-r--r--js/Sources/READC_f.js14
-rw-r--r--js/Sources/RFILE_f.js10
-rw-r--r--js/Sources/SAWTOOTH_f.js10
-rw-r--r--js/Sources/STEP.js22
-rw-r--r--js/Sources/STEP_FUNCTION.js10
-rw-r--r--js/Sources/SampleCLK.js12
-rw-r--r--js/Sources/TIME_f.js6
-rw-r--r--js/Sources/TKSCALE.js8
30 files changed, 187 insertions, 187 deletions
diff --git a/js/Sources/CLKINV_f.js b/js/Sources/CLKINV_f.js
index 72b26ff8..4daea14e 100644
--- a/js/Sources/CLKINV_f.js
+++ b/js/Sources/CLKINV_f.js
@@ -3,11 +3,11 @@ function CLKINV_f() {
CLKINV_f.prototype.define = function CLKINV_f() {
this.prt = 1;
this.model = scicos_model();
- this.model.sim = new ScilabString("input");
- this.model.evtout = new ScilabDouble(1);
- this.model.ipar = new ScilabDouble(this.prt);
- this.model.blocktype = new ScilabString("d");
- this.model.firing = new ScilabDouble(-1);
+ this.model.sim = new ScilabString(["input"]);
+ this.model.evtout = new ScilabDouble([1]);
+ this.model.ipar = new ScilabDouble([this.prt]);
+ this.model.blocktype = new ScilabString(["d"]);
+ this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
exprs = string(this.prt);
gr_i = [];
@@ -38,9 +38,9 @@ function CLKINV_f() {
if (this.prt<=0) {
block_parameter_error(msprintf("Wrong values for \'Port Number\' parameter: %d.",this.prt),"Strictly positive integer expected.");
} else {
- this.model.ipar = new ScilabDouble(this.prt);
- this.model.evtout = new ScilabDouble(1);
- this.model.firing = new ScilabDouble(-1);
+ this.model.ipar = new ScilabDouble([this.prt]);
+ this.model.evtout = new ScilabDouble([1]);
+ this.model.firing = new ScilabDouble([-1]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js
index 03f3c741..b6c17b87 100644
--- a/js/Sources/CLKIN_f.js
+++ b/js/Sources/CLKIN_f.js
@@ -3,11 +3,11 @@ function CLKIN_f() {
CLKIN_f.prototype.define = function CLKIN_f() {
this.prt = 1;
this.model = scicos_model();
- this.model.sim = new ScilabString("input");
- this.model.evtout = new ScilabDouble(1);
- this.model.ipar = new ScilabDouble(this.prt);
- this.model.blocktype = new ScilabString("d");
- this.model.firing = new ScilabDouble(-1);
+ this.model.sim = new ScilabString(["input"]);
+ this.model.evtout = new ScilabDouble([1]);
+ this.model.ipar = new ScilabDouble([this.prt]);
+ this.model.blocktype = new ScilabString(["d"]);
+ this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
exprs = string(this.prt);
this.x = standard_define([1,1],this.model,exprs," ");
@@ -37,9 +37,9 @@ function CLKIN_f() {
if (this.prt<=0) {
message("Port number must be a positive integer");
} else {
- this.model.ipar = new ScilabDouble(this.prt);
- this.model.evtout = new ScilabDouble(1);
- this.model.firing = new ScilabDouble(-1);
+ this.model.ipar = new ScilabDouble([this.prt]);
+ this.model.evtout = new ScilabDouble([1]);
+ this.model.firing = new ScilabDouble([-1]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/CLOCK_c.js b/js/Sources/CLOCK_c.js
index bb04a18a..dd3d0f6f 100644
--- a/js/Sources/CLOCK_c.js
+++ b/js/Sources/CLOCK_c.js
@@ -82,7 +82,7 @@ function CLOCK_c() {
if (ok) {
xx.graphics.exprs = this.exprs0;
this.model.rpar = [[this.dt],[this.t0]];
- this.model.firing = new ScilabDouble(this.t0);
+ this.model.firing = new ScilabDouble([this.t0]);
xx.model = this.model;
arg1.model.rpar.objs[path-1] = xx;
break;
diff --git a/js/Sources/CLOCK_f.js b/js/Sources/CLOCK_f.js
index c387dbca..05832c5f 100644
--- a/js/Sources/CLOCK_f.js
+++ b/js/Sources/CLOCK_f.js
@@ -81,8 +81,8 @@ function CLOCK_f() {
}
if (ok) {
xx.graphics.exprs = this.exprs0;
- this.model.rpar = new ScilabDouble(this.dt);
- this.model.firing = new ScilabDouble(this.t0);
+ this.model.rpar = new ScilabDouble([this.dt]);
+ this.model.firing = new ScilabDouble([this.t0]);
xx.model = this.model;
arg1.model.rpar.objs[path-1] = xx;
break;
diff --git a/js/Sources/CONST.js b/js/Sources/CONST.js
index 2c9dae8a..f42bf2cf 100644
--- a/js/Sources/CONST.js
+++ b/js/Sources/CONST.js
@@ -3,11 +3,11 @@ function CONST() {
CONST.prototype.define = function CONST() {
this.C = 1;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("cstblk4"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["cstblk4"]), new ScilabDouble([4]));
this.model.in1 = [];
- this.model.out = new ScilabDouble(1);
- this.model.rpar = new ScilabDouble(this.C);
- this.model.blocktype = new ScilabString("d");
+ this.model.out = new ScilabDouble([1]);
+ 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 = [];
@@ -41,7 +41,7 @@ function CONST() {
message("C matrix is not supported, use CONST_m instead");
} else {
this.model.rpar = this.C.slice();
- this.model.out = new ScilabDouble(nout);
+ this.model.out = new ScilabDouble([nout]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js
index e5182263..ad63477d 100644
--- a/js/Sources/CONST_f.js
+++ b/js/Sources/CONST_f.js
@@ -3,11 +3,11 @@ function CONST_f() {
CONST_f.prototype.define = function CONST_f() {
this.C = 1;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("cstblk"),new ScilabDouble(1));
+ this.model.sim = list(new ScilabString(["cstblk"]), new ScilabDouble([1]));
this.model.in1 = [];
- this.model.out = new ScilabDouble(1);
- this.model.rpar = new ScilabDouble(this.C);
- this.model.blocktype = new ScilabString("d");
+ this.model.out = new ScilabDouble([1]);
+ 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 = [];
@@ -38,7 +38,7 @@ function CONST_f() {
message("C must have at least one element");
} else {
this.model.rpar = this.C.slice();
- this.model.out = new ScilabDouble(nout);
+ this.model.out = new ScilabDouble([nout]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js
index 4d03f8ea..53015ef6 100644
--- a/js/Sources/CONST_m.js
+++ b/js/Sources/CONST_m.js
@@ -3,14 +3,14 @@ function CONST_m() {
CONST_m.prototype.define = function CONST_m() {
this.C = [1];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("cstblk4"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["cstblk4"]), new ScilabDouble([4]));
this.model.in1 = [];
- this.model.out = new ScilabDouble(size(this.C,1));
+ this.model.out = new ScilabDouble([size(this.C,1)]);
this.model.in2 = [];
- this.model.out2 = new ScilabDouble(size(this.C,2));
+ this.model.out2 = new ScilabDouble([size(this.C,2)]);
this.model.rpar = this.C;
this.model.opar = list();
- this.model.blocktype = new ScilabString("d");
+ this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
exprs = sci2exp(this.C);
gr_i = [];
@@ -40,7 +40,7 @@ function CONST_m() {
if (find(nout==0)!=[]) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter","Constant Value"),"Constant value must have at least one element.");
} else {
- this.model.sim = list(new ScilabString("cstblk4_m"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["cstblk4_m"]), new ScilabDouble([4]));
this.model.opar = list(this.C);
if ((this.type[this.C-1]==1)) {
if (isreal(this.C)) {
diff --git a/js/Sources/CURV_f.js b/js/Sources/CURV_f.js
index 67f997cb..23d4155a 100644
--- a/js/Sources/CURV_f.js
+++ b/js/Sources/CURV_f.js
@@ -8,12 +8,12 @@ function CURV_f() {
ipar = [[size(xx,1)],[axisdata.slice()]];
rpar = [[xx],[yy],[rect.slice()]];
this.model = scicos_model();
- this.model.sim = new ScilabString("intplt");
+ this.model.sim = new ScilabString(["intplt"]);
this.model.in1 = [];
- this.model.out = new ScilabDouble(1);
+ this.model.out = new ScilabDouble([1]);
this.model.rpar = [[xx],[yy],[rect.slice()]];
this.model.ipar = [[size(xx,1)],[axisdata.slice()]];
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
@@ -53,7 +53,7 @@ function CURV_f() {
ok = false;
}
if (ok) {
- this.model.sim = new ScilabString("intplt");
+ this.model.sim = new ScilabString(["intplt"]);
this.model.firing = [];
rect = gc[1-1];
this.model.rpar = [[xx.slice()],[yy.slice()],[rect.slice()]];
diff --git a/js/Sources/Counter.js b/js/Sources/Counter.js
index 0d62bd5a..8ea1d428 100644
--- a/js/Sources/Counter.js
+++ b/js/Sources/Counter.js
@@ -5,13 +5,13 @@ function Counter() {
this.maxim = 2;
this.rule = 1;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("counter"),new ScilabDouble(4));
- this.model.evtin = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
- this.model.out2 = new ScilabDouble(1);
- this.model.dstate = new ScilabDouble(0);
+ this.model.sim = list(new ScilabString(["counter"]), new ScilabDouble([4]));
+ this.model.evtin = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.dstate = new ScilabDouble([0]);
this.model.ipar = [[this.rule],[this.maxim],[this.minim]];
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
exprs = [[string(this.minim)],[string(this.maxim)],[string(this.rule)]];
gr_i = [];
@@ -50,7 +50,7 @@ function Counter() {
block_parameter_error(msprintf("Wrong value for \'Rule\' parameter: %d",this.rule),msprintf("Must be in the interval %s.","[1,2]"));
} else {
graphics.exprs = exprs;
- this.model.dstate = new ScilabDouble(0);
+ this.model.dstate = new ScilabDouble([0]);
this.model.ipar = [[this.rule],[this.maxim],[this.minim]];
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js
index c5ca8be4..36c4ee6f 100644
--- a/js/Sources/FROMWS_c.js
+++ b/js/Sources/FROMWS_c.js
@@ -6,15 +6,15 @@ function FROMWS_c() {
this.ZC = 1;
this.OutEnd = 0;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("fromws_c"),new ScilabDouble(4));
- this.model.out = new ScilabDouble(-1);
- this.model.out2 = new ScilabDouble(-2);
- this.model.outtyp = new ScilabDouble(-1);
+ this.model.sim = list(new ScilabString(["fromws_c"]), new ScilabDouble([4]));
+ this.model.out = new ScilabDouble([-1]);
+ this.model.out2 = new ScilabDouble([-2]);
+ this.model.outtyp = new ScilabDouble([-1]);
this.model.ipar = [[length(this.varnam)],[this._str2code[this.varnam-1]],[this.Method],[this.ZC],[this.OutEnd]];
this.model.evtin = [1];
this.model.evtout = [1];
this.model.firing = [0];
- this.model.blocktype = new ScilabString("d");
+ 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)]];
diff --git a/js/Sources/GENSIN_f.js b/js/Sources/GENSIN_f.js
index b602ea6e..cc03f8a5 100644
--- a/js/Sources/GENSIN_f.js
+++ b/js/Sources/GENSIN_f.js
@@ -3,13 +3,13 @@ function GENSIN_f() {
GENSIN_f.prototype.define = function GENSIN_f() {
rpar = [[1],[1],[0]];
this.model = scicos_model();
- this.model.sim = new ScilabString("gensin");
+ this.model.sim = new ScilabString(["gensin"]);
this.model.in1 = [];
- this.model.out = new ScilabDouble(1);
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
+ this.model.out = new ScilabDouble([1]);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
this.model.rpar = [[1],[1],[0]];
- this.model.blocktype = new ScilabString("c");
+ 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 = [];
@@ -47,8 +47,8 @@ function GENSIN_f() {
if (ok) {
[model,graphics,ok] = check_io(this.model,graphics,[],1,[],[]);
this.model.rpar = [[this.M],[this.F],[this.P]];
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/GENSQR_f.js b/js/Sources/GENSQR_f.js
index 3cffcef1..2d0a4372 100644
--- a/js/Sources/GENSQR_f.js
+++ b/js/Sources/GENSQR_f.js
@@ -3,13 +3,13 @@ function GENSQR_f() {
GENSQR_f.prototype.define = function GENSQR_f() {
this.Amplitude = 1;
this.model = scicos_model();
- this.model.sim = new ScilabString("gensqr");
- this.model.out = new ScilabDouble(1);
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
- this.model.evtin = new ScilabDouble(1);
- this.model.dstate = new ScilabDouble(this.Amplitude);
- this.model.blocktype = new ScilabString("d");
+ this.model.sim = new ScilabString(["gensqr"]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
+ this.model.evtin = new ScilabDouble([1]);
+ 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 = [];
@@ -40,9 +40,9 @@ function GENSQR_f() {
break;
}
graphics.exprs = exprs;
- this.model.dstate = new ScilabDouble(this.Amplitude);
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
+ this.model.dstate = new ScilabDouble([this.Amplitude]);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
this.x.graphics = graphics;
this.x.model = this.model;
break;
diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js
index 509cf149..0f2bed09 100644
--- a/js/Sources/GEN_SQR.js
+++ b/js/Sources/GEN_SQR.js
@@ -19,27 +19,27 @@ function GEN_SQR() {
scs_m_1.objs[15-1] = scicos_block(gui="SampleCLK",graphics=scicos_graphics(orig=[18.313686,403.57431],sz=[60,40],flip=true,theta=0,exprs=[["F/2"],["0"]],pin=[],pout=[],pein=[],peout=16,gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="sampleclk",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[],evtout=1,state=[],dstate=[],odstate=list(),rpar=[[1/2],[0]],ipar=[],opar=list(),blocktype="d",firing=-1,dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[16-1] = scicos_link(xx=[[48.313686],[48.229901]],yy=[[403.57431],[385.21998]],id="drawlink",thick=[0,0],ct=[5,-1],from=[15,1,0],to=[1,1,1]);
this.model = scicos_model();
- this.model.sim = new ScilabString("csuper");
+ this.model.sim = new ScilabString(["csuper"]);
this.model.in1 = [];
this.model.in2 = [];
- this.model.intyp = new ScilabDouble(1);
- this.model.out = new ScilabDouble(-1);
- this.model.out2 = new ScilabDouble(-2);
- this.model.outtyp = new ScilabDouble(-1);
+ this.model.intyp = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([-1]);
+ this.model.out2 = new ScilabDouble([-2]);
+ this.model.outtyp = new ScilabDouble([-1]);
this.model.evtin = [];
this.model.evtout = [];
this.model.state = [];
this.model.dstate = [];
this.model.odstate = list();
- this.model.rpar = new ScilabDouble(scs_m_1);
- this.model.ipar = new ScilabDouble(1);
+ this.model.rpar = new ScilabDouble([scs_m_1]);
+ this.model.ipar = new ScilabDouble([1]);
this.model.opar = list();
- this.model.blocktype = new ScilabString("h");
+ this.model.blocktype = new ScilabString(["h"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- this.model.label = new ScilabString("");
- this.model.nzcross = new ScilabDouble(0);
- this.model.nmode = new ScilabDouble(0);
+ this.model.label = new ScilabString([""]);
+ this.model.nzcross = new ScilabDouble([0]);
+ this.model.nmode = new ScilabDouble([0]);
this.model.equations = list();
Amin = -1;
Amax = 1;
diff --git a/js/Sources/Ground_g.js b/js/Sources/Ground_g.js
index 13967102..89bdf6a7 100644
--- a/js/Sources/Ground_g.js
+++ b/js/Sources/Ground_g.js
@@ -3,15 +3,15 @@ function Ground_g() {
Ground_g.prototype.define = function Ground_g() {
C = [0];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("cstblk4_m"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["cstblk4_m"]), new ScilabDouble([4]));
this.model.in1 = [];
- this.model.out = new ScilabDouble(1);
+ this.model.out = new ScilabDouble([1]);
this.model.in2 = [];
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(-1);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([-1]);
this.model.rpar = [];
this.model.opar = list(C);
- this.model.blocktype = new ScilabString("d");
+ this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
exprs = [];
gr_i = [];
diff --git a/js/Sources/INIMPL_f.js b/js/Sources/INIMPL_f.js
index 10b32d3a..a9cf9b9d 100644
--- a/js/Sources/INIMPL_f.js
+++ b/js/Sources/INIMPL_f.js
@@ -2,16 +2,16 @@
function INIMPL_f() {
INIMPL_f.prototype.define = function INIMPL_f() {
this.model = scicos_model();
- this.model.sim = new ScilabString("inimpl");
+ this.model.sim = new ScilabString(["inimpl"]);
this.model.out = [-1];
this.model.out2 = [1];
this.model.ipar = [1];
this.model.dep_ut = [false,false];
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
mo = modelica();
mo.model = "PORT";
mo.outputs = "n";
- this.model.equations = new ScilabDouble(mo);
+ this.model.equations = new ScilabDouble([mo]);
this.prt = 1;
exprs = "1";
gr_i = [];
@@ -49,7 +49,7 @@ function INIMPL_f() {
needcompile = 4;
y = needcompile;
}
- this.model.ipar = new ScilabDouble(this.prt);
+ this.model.ipar = new ScilabDouble([this.prt]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/IN_f.js b/js/Sources/IN_f.js
index d3a1e578..0496b565 100644
--- a/js/Sources/IN_f.js
+++ b/js/Sources/IN_f.js
@@ -3,12 +3,12 @@ function IN_f() {
IN_f.prototype.define = function IN_f() {
prt = 1;
this.model = scicos_model();
- this.model.sim = new ScilabString("input");
- this.model.out = new ScilabDouble(-1);
- this.model.out2 = new ScilabDouble(-2);
- this.model.outtyp = new ScilabDouble(-1);
- this.model.ipar = new ScilabDouble(prt);
- this.model.blocktype = new ScilabString("c");
+ this.model.sim = new ScilabString(["input"]);
+ this.model.out = new ScilabDouble([-1]);
+ this.model.out2 = new ScilabDouble([-2]);
+ this.model.outtyp = new ScilabDouble([-1]);
+ this.model.ipar = new ScilabDouble([prt]);
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
exprs = sci2exp(prt);
gr_i = [];
@@ -51,11 +51,11 @@ function IN_f() {
needcompile = 4;
y = needcompile;
}
- this.model.ipar = new ScilabDouble(prt);
+ this.model.ipar = new ScilabDouble([prt]);
this.model.firing = [];
- this.model.out = new ScilabDouble(otsz[1-1]);
- this.model.out2 = new ScilabDouble(otsz[2-1]);
- this.model.outtyp = new ScilabDouble(ot);
+ this.model.out = new ScilabDouble([otsz[1-1]]);
+ this.model.out2 = new ScilabDouble([otsz[2-1]]);
+ this.model.outtyp = new ScilabDouble([ot]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/Modulo_Count.js b/js/Sources/Modulo_Count.js
index a01089c5..7c161252 100644
--- a/js/Sources/Modulo_Count.js
+++ b/js/Sources/Modulo_Count.js
@@ -4,12 +4,12 @@ function Modulo_Count() {
this.ini_c = 0;
this.base = 3;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("modulo_count"),new ScilabDouble(4));
- this.model.evtin = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
- this.model.dstate = new ScilabDouble(this.ini_c);
- this.model.ipar = new ScilabDouble(this.base);
- this.model.blocktype = new ScilabString("c");
+ this.model.sim = list(new ScilabString(["modulo_count"]), new ScilabDouble([4]));
+ this.model.evtin = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.dstate = new ScilabDouble([this.ini_c]);
+ 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 = [];
@@ -46,8 +46,8 @@ function Modulo_Count() {
block_parameter_error(msprintf("Wrong values for \'Upper Limit\' parameter: %d.",this.base),"Strictly positive integer expected.");
} else {
graphics.exprs = exprs;
- this.model.ipar = new ScilabDouble(this.base);
- this.model.dstate = new ScilabDouble(this.ini_c);
+ this.model.ipar = new ScilabDouble([this.base]);
+ this.model.dstate = new ScilabDouble([this.ini_c]);
this.x.graphics = graphics;
this.x.model = this.model;
break;
diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js
index 3823707f..c1bc6b08 100644
--- a/js/Sources/PULSE_SC.js
+++ b/js/Sources/PULSE_SC.js
@@ -14,27 +14,27 @@ function PULSE_SC() {
scs_m_1.objs[10-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[174.57795,196.09381],sz=[20,20],flip=true,theta=0,exprs="1",pin=11,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[11-1] = scicos_link(xx=[[154.57795],[174.57795]],yy=[[206.09381],[206.09381]],id="drawlink",thick=[0,0],ct=[1,1],from=[3,1,0],to=[10,1,1]);
this.model = scicos_model();
- this.model.sim = new ScilabString("csuper");
+ this.model.sim = new ScilabString(["csuper"]);
this.model.in1 = [];
this.model.in2 = [];
- this.model.intyp = new ScilabDouble(1);
- this.model.out = new ScilabDouble(-1);
- this.model.out2 = new ScilabDouble(-2);
- this.model.outtyp = new ScilabDouble(-1);
+ this.model.intyp = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([-1]);
+ this.model.out2 = new ScilabDouble([-2]);
+ this.model.outtyp = new ScilabDouble([-1]);
this.model.evtin = [];
this.model.evtout = [];
this.model.state = [];
this.model.dstate = [];
this.model.odstate = list();
- this.model.rpar = new ScilabDouble(scs_m_1);
- this.model.ipar = new ScilabDouble(1);
+ this.model.rpar = new ScilabDouble([scs_m_1]);
+ this.model.ipar = new ScilabDouble([1]);
this.model.opar = list();
- this.model.blocktype = new ScilabString("h");
+ this.model.blocktype = new ScilabString(["h"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- this.model.label = new ScilabString("");
- this.model.nzcross = new ScilabDouble(0);
- this.model.nmode = new ScilabDouble(0);
+ this.model.label = new ScilabString([""]);
+ this.model.nzcross = new ScilabDouble([0]);
+ this.model.nmode = new ScilabDouble([0]);
this.model.equations = list();
E = 0.1;
W = 30;
diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js
index a6fc7582..8090618a 100644
--- a/js/Sources/RAMP.js
+++ b/js/Sources/RAMP.js
@@ -6,13 +6,13 @@ function RAMP() {
this.stt = 0;
rpar = [[this.slope],[this.stt],[this.iout]];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("ramp"),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString(["ramp"]), new ScilabDouble([4]));
this.model.in1 = [];
- this.model.out = new ScilabDouble(1);
+ this.model.out = new ScilabDouble([1]);
this.model.rpar = rpar;
- this.model.blocktype = new ScilabString("c");
- this.model.nmode = new ScilabDouble(1);
- this.model.nzcross = new ScilabDouble(1);
+ this.model.blocktype = new ScilabString(["c"]);
+ this.model.nmode = new ScilabDouble([1]);
+ this.model.nzcross = new ScilabDouble([1]);
this.model.dep_ut = [false,true];
exprs = [string(rpar)];
gr_i = [];
diff --git a/js/Sources/RAND_f.js b/js/Sources/RAND_f.js
index af0850f7..76b539d1 100644
--- a/js/Sources/RAND_f.js
+++ b/js/Sources/RAND_f.js
@@ -7,13 +7,13 @@ function RAND_f() {
out = 1;
this.flag = 0;
this.model = scicos_model();
- this.model.sim = new ScilabString("rndblk");
- this.model.out = new ScilabDouble(out);
- this.model.evtin = new ScilabDouble(1);
+ this.model.sim = new ScilabString(["rndblk"]);
+ this.model.out = new ScilabDouble([out]);
+ this.model.evtin = new ScilabDouble([1]);
this.model.dstate = [[int(rand()*(10^7-1))],[0*this.a.slice()]];
this.model.rpar = [[this.a.slice()],[this.b.slice()]];
- this.model.ipar = new ScilabDouble(this.flag);
- this.model.blocktype = new ScilabString("d");
+ 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 = [];
@@ -57,8 +57,8 @@ function RAND_f() {
} else {
nout = size(this.a,"*");
graphics.exprs = exprs;
- this.model.out = new ScilabDouble(nout);
- this.model.ipar = new ScilabDouble(this.flag);
+ this.model.out = new ScilabDouble([nout]);
+ this.model.ipar = new ScilabDouble([this.flag]);
this.model.rpar = [[this.a.slice()],[this.b.slice()]];
this.model.dstate = [[this.seed_c],[0*this.a.slice()]];
this.x.graphics = graphics;
diff --git a/js/Sources/RAND_m.js b/js/Sources/RAND_m.js
index cd4c8808..e3eaf483 100644
--- a/js/Sources/RAND_m.js
+++ b/js/Sources/RAND_m.js
@@ -8,20 +8,20 @@ function RAND_m() {
function_name = "rndblk_m";
funtyp = 4;
this.model = scicos_model();
- this.model.sim = list(new ScilabString(function_name),new ScilabDouble(funtyp));
+ this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = [];
this.model.in2 = [];
this.model.intyp = [];
- this.model.out = new ScilabDouble(1);
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
- this.model.evtin = new ScilabDouble(1);
+ this.model.out = new ScilabDouble([1]);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
+ this.model.evtin = new ScilabDouble([1]);
this.model.evtout = [];
this.model.state = [];
this.model.dstate = [[int(rand()*(10^7-1))],[0*this.a.slice()]];
this.model.rpar = [this.a.slice(),this.b.slice()];
- this.model.ipar = new ScilabDouble(this.flag);
- this.model.blocktype = new ScilabString("d");
+ this.model.ipar = new ScilabDouble([this.flag]);
+ 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))])]];
@@ -81,9 +81,9 @@ function RAND_m() {
if (ok) {
[model,graphics,ok] = set_io(this.model,graphics,list([],[]),list(out,ot),1,[]);
if (ok) {
- this.model.sim = list(new ScilabString(function_name),new ScilabDouble(4));
+ this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([4]));
graphics.exprs = exprs;
- this.model.ipar = new ScilabDouble(this.flag);
+ this.model.ipar = new ScilabDouble([this.flag]);
this.x.graphics = graphics;
this.x.model = this.model;
break;
diff --git a/js/Sources/READAU_f.js b/js/Sources/READAU_f.js
index 77627c37..3c141b05 100644
--- a/js/Sources/READAU_f.js
+++ b/js/Sources/READAU_f.js
@@ -13,12 +13,12 @@ function READAU_f() {
ievt = 0;
nout = size(outmask,"*");
this.model = scicos_model();
- this.model.sim = list(new ScilabString("readau"),new ScilabDouble(2));
- this.model.out = new ScilabDouble(nout);
- this.model.evtin = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["readau"]), new ScilabDouble([2]));
+ this.model.out = new ScilabDouble([nout]);
+ this.model.evtin = new ScilabDouble([1]);
this.model.dstate = [[1],[1],[lunit],[zeros(this.N*M,1)]];
this.model.ipar = [[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.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
exprs = [[fname],[string(this.N)],[string(this.swap)]];
gr_i = [];
diff --git a/js/Sources/READC_f.js b/js/Sources/READC_f.js
index 9e456d2b..53601adf 100644
--- a/js/Sources/READC_f.js
+++ b/js/Sources/READC_f.js
@@ -15,14 +15,14 @@ function READC_f() {
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]];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("readc"),new ScilabDouble(2));
- this.model.out = new ScilabDouble(nout);
- this.model.evtin = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["readc"]), new ScilabDouble([2]));
+ this.model.out = new ScilabDouble([nout]);
+ this.model.evtin = new ScilabDouble([1]);
this.model.evtout = [];
this.model.dstate = [[1],[1],[lunit],[zeros(this.N*this.M,1)]];
this.model.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.blocktype = new ScilabString("d");
- this.model.firing = new ScilabDouble(-1);
+ 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 = [];
@@ -117,9 +117,9 @@ function READC_f() {
this.frmt1 = part(this.frmt1,1,3);
if (ok) {
if (ievt==0) {
- this.model.firing = new ScilabDouble(-1);
+ this.model.firing = new ScilabDouble([-1]);
} else {
- this.model.firing = new ScilabDouble(0);
+ 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()]];
if (prod(size(dstate))!=(this.N*this.M)+3) {
diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js
index 18a469ac..68a5b065 100644
--- a/js/Sources/RFILE_f.js
+++ b/js/Sources/RFILE_f.js
@@ -13,12 +13,12 @@ function RFILE_f() {
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)]];
this.model = scicos_model();
- this.model.sim = new ScilabString("readf");
- this.model.out = new ScilabDouble(nout);
- this.model.evtin = new ScilabDouble(1);
+ this.model.sim = new ScilabString(["readf"]);
+ this.model.out = new ScilabDouble([nout]);
+ this.model.evtin = new ScilabDouble([1]);
this.model.dstate = dstate;
this.model.ipar = [[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.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
exprs = [[sci2exp([])],[sci2exp(this.outmask)],[fname],[frmt],[string(this.N)],[sci2exp(out)]];
gr_i = [];
@@ -102,7 +102,7 @@ function RFILE_f() {
if (ievt==0) {
this.model.firing = [];
} else {
- this.model.firing = new ScilabDouble(0);
+ 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()]];
if (prod(size(dstate))!=(nout+ievt)*this.N+3) {
diff --git a/js/Sources/SAWTOOTH_f.js b/js/Sources/SAWTOOTH_f.js
index 40a2aaa4..655ab346 100644
--- a/js/Sources/SAWTOOTH_f.js
+++ b/js/Sources/SAWTOOTH_f.js
@@ -2,11 +2,11 @@
function SAWTOOTH_f() {
SAWTOOTH_f.prototype.define = function SAWTOOTH_f() {
this.model = scicos_model();
- this.model.sim = new ScilabString("sawtth");
- this.model.out = new ScilabDouble(1);
- this.model.evtin = new ScilabDouble(1);
- this.model.dstate = new ScilabDouble(0);
- this.model.blocktype = new ScilabString("c");
+ this.model.sim = new ScilabString(["sawtth"]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.evtin = new ScilabDouble([1]);
+ this.model.dstate = new ScilabDouble([0]);
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
exprs = " ";
gr_i = [];
diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js
index 3672850d..d2bb8443 100644
--- a/js/Sources/STEP.js
+++ b/js/Sources/STEP.js
@@ -3,15 +3,15 @@ function STEP() {
STEP.prototype.define = function STEP() {
rpar = [[0],[1]];
this.model = scicos_model();
- this.model.sim = list(new ScilabString("step_func"),new ScilabDouble(4));
- this.model.evtin = new ScilabDouble(1);
- this.model.evtout = new ScilabDouble(1);
- this.model.out = new ScilabDouble(1);
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
- this.model.firing = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["step_func"]), new ScilabDouble([4]));
+ this.model.evtin = new ScilabDouble([1]);
+ this.model.evtout = new ScilabDouble([1]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
+ this.model.firing = new ScilabDouble([1]);
this.model.rpar = rpar;
- this.model.blocktype = new ScilabString("c");
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
exprs = [[string(1)],[string(rpar)]];
gr_i = [];
@@ -55,12 +55,12 @@ function STEP() {
}
}
if (ok) {
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
[model,graphics,ok] = check_io(this.model,graphics,[],size(this.fi,"*"),1,1);
}
if (ok) {
- this.model.firing = new ScilabDouble(this.temps);
+ this.model.firing = new ScilabDouble([this.temps]);
if (this.temps==0) {
rpar = [[this.fi],[this.fi]];
} else {
diff --git a/js/Sources/STEP_FUNCTION.js b/js/Sources/STEP_FUNCTION.js
index 696ea445..74ab2e2a 100644
--- a/js/Sources/STEP_FUNCTION.js
+++ b/js/Sources/STEP_FUNCTION.js
@@ -23,7 +23,7 @@ function STEP_FUNCTION() {
graphics.orig = [80,10];
graphics.sz = [20,20];
graphics.exprs = ["1"];
- this.model.ipar = new ScilabDouble(1);
+ this.model.ipar = new ScilabDouble([1]);
graphics.pin = 3;
blk.graphics = graphics;
blk.model = this.model;
@@ -42,10 +42,10 @@ function STEP_FUNCTION() {
blk={};
lnk={};
this.model = scicos_model();
- this.model.sim = new ScilabString("csuper");
- this.model.out = new ScilabDouble(1);
- this.model.out2 = new ScilabDouble(1);
- this.model.outtyp = new ScilabDouble(1);
+ this.model.sim = new ScilabString(["csuper"]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.out2 = new ScilabDouble([1]);
+ this.model.outtyp = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
diff --git a/js/Sources/SampleCLK.js b/js/Sources/SampleCLK.js
index 34505fc0..2001441f 100644
--- a/js/Sources/SampleCLK.js
+++ b/js/Sources/SampleCLK.js
@@ -2,11 +2,11 @@
function SampleCLK() {
SampleCLK.prototype.define = function SampleCLK() {
this.model = scicos_model();
- this.model.sim = new ScilabString("sampleclk");
- this.model.evtout = new ScilabDouble(1);
+ this.model.sim = new ScilabString(["sampleclk"]);
+ this.model.evtout = new ScilabDouble([1]);
this.model.rpar = [1,0];
- this.model.blocktype = new ScilabString("d");
- this.model.firing = new ScilabDouble(-1);
+ this.model.blocktype = new ScilabString(["d"]);
+ this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
exprs = [[sci2exp(1)],[sci2exp(0)]];
this.x = standard_define([2,2],this.model,exprs," ");
@@ -48,8 +48,8 @@ function SampleCLK() {
y = needcompile;
}
this.model.rpar = [[this.frequ],[this.offset]];
- this.model.evtout = new ScilabDouble(1);
- this.model.firing = new ScilabDouble(-1);
+ this.model.evtout = new ScilabDouble([1]);
+ this.model.firing = new ScilabDouble([-1]);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/TIME_f.js b/js/Sources/TIME_f.js
index 4fbd512e..6a4e8b94 100644
--- a/js/Sources/TIME_f.js
+++ b/js/Sources/TIME_f.js
@@ -2,9 +2,9 @@
function TIME_f() {
TIME_f.prototype.define = function TIME_f() {
this.model = scicos_model();
- this.model.sim = new ScilabString("timblk");
- this.model.out = new ScilabDouble(1);
- this.model.blocktype = new ScilabString("c");
+ this.model.sim = new ScilabString(["timblk"]);
+ this.model.out = new ScilabDouble([1]);
+ this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
diff --git a/js/Sources/TKSCALE.js b/js/Sources/TKSCALE.js
index 23270b87..977dd1c4 100644
--- a/js/Sources/TKSCALE.js
+++ b/js/Sources/TKSCALE.js
@@ -5,11 +5,11 @@ function TKSCALE() {
this.b = 10;
this.f = 1;
this.model = scicos_model();
- this.model.sim = list(new ScilabString("tkscaleblk"),new ScilabDouble(5));
- this.model.out = new ScilabDouble(1);
- this.model.evtin = new ScilabDouble(1);
+ this.model.sim = list(new ScilabString(["tkscaleblk"]), new ScilabDouble([5]));
+ this.model.out = new ScilabDouble([1]);
+ this.model.evtin = new ScilabDouble([1]);
this.model.rpar = [[this.a],[this.b],[this.f]];
- this.model.blocktype = new ScilabString("d");
+ this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
exprs = [[sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.f)]];
gr_i = [];