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.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/Sinks/WRITEC_f.js b/js/Sinks/WRITEC_f.js
index 581d3f02..baaa2687 100644
--- a/js/Sinks/WRITEC_f.js
+++ b/js/Sinks/WRITEC_f.js
@@ -13,7 +13,7 @@ model.sim=list("writec",2);
model.in1=in1;
model.evtin=1;
model.dstate=[[-1],[lunit],[zeros((nin+1)*N,1)]];
-model.ipar=[[length(fname)],[_str2code[frmt-1]],[N],[swap],[_str2code[fname-1]]];
+model.ipar=[[length(fname)],[this._str2code[frmt-1]],[N],[swap],[this._str2code[fname-1]]];
model.blocktype="d";
model.dep_ut=[true,false];
exprs=[[sci2exp(in1)],[fname],[frmt],[string(N),string(swap)]];
@@ -47,17 +47,17 @@ fmts=["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll",
if (and(frmt1!=fmts)) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),frmt1),gettext("Valid formats are: "+strcat(fmts,", ")));
ok=false;
-} else if (alreadyran&&fname1!=fname) {
+} else if (this.alreadyran&&fname1!=fname) {
block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running"),gettext("Input Format")),gettext("End current simulation first."));
ok=false;
-} else if (alreadyran&&N!=ipar[5-1]) {
+} else if (this.alreadyran&&N!=ipar[5-1]) {
block_parameter_error(msprintf(gettext("You cannot modify \'Buffer Size\' when running."),gettext("Buffer Size")),gettext("End current simulation first"));
ok=false;
} else if (fname1=="") {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Output File Name")),gettext("You must provide a filename."));
} else if (fileparts(fname1)!="") {
[pa,fn,ex]=fileparts(fname1);
-if (!isdir[pa-1]) {
+if (!this.isdir[pa-1]) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Output File Name")),msprintf(gettext("Directory \'%s\' does not exist"),pa));
ok=false;
}
@@ -73,8 +73,8 @@ ok=false;
}
frmt1=part(frmt1,1,3);
if (ok) {
-ipar=[[length(fname1)],[_str2code[frmt1-1]],[N],[swap],[_str2code[fname1-1]]];
-if (prod[size(dstate)-1]!=(nin+1)*N+2) {
+ipar=[[length(fname1)],[this._str2code[frmt1-1]],[N],[swap],[this._str2code[fname1-1]]];
+if (prod(size(dstate))!=(nin+1)*N+2) {
dstate=[[-1],[lunit],[zeros((nin+1)*N,1)]];
}
model.in1=nin;