summaryrefslogtreecommitdiff
path: root/js/Sinks/WRITEC_f.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Sinks/WRITEC_f.js')
-rw-r--r--js/Sinks/WRITEC_f.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/js/Sinks/WRITEC_f.js b/js/Sinks/WRITEC_f.js
index b8be9fc4..1198b764 100644
--- a/js/Sinks/WRITEC_f.js
+++ b/js/Sinks/WRITEC_f.js
@@ -8,17 +8,17 @@ function WRITEC_f() {
this.swap = 0;
lunit = 0;
this.N = 2;
- model = scicos_model();
- model.sim = list("writec",2);
- model.in1 = this.in1;
- model.evtin = 1;
- model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
- model.ipar = [[length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]];
- model.blocktype = "d";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("writec",2);
+ this.model.in1 = new ScilabDouble(this.in1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ this.model.ipar = [[length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]];
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [true,false];
exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]];
gr_i = [];
- this.x = standard_define([4,2],model,exprs,gr_i);
+ this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
WRITEC_f.prototype.details = function WRITEC_f() {
@@ -43,9 +43,9 @@ function WRITEC_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- ipar = model.ipar;
- dstate = model.dstate;
+ this.model = arg1.model;
+ ipar = this.model.ipar;
+ dstate = this.model.dstate;
lunit = dstate[2-1];
fname = exprs[2-1];
frmt = exprs[3-1];
@@ -92,12 +92,12 @@ function WRITEC_f() {
if (prod(size(dstate))!=(nin+1)*this.N+2) {
dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
- model.in1 = nin;
- model.dstate = dstate;
- model.ipar = ipar;
+ this.model.in1 = new ScilabDouble(nin);
+ this.model.dstate = dstate;
+ this.model.ipar = ipar;
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}