summaryrefslogtreecommitdiff
path: root/js/Sinks/WFILE_f.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Sinks/WFILE_f.js')
-rw-r--r--js/Sinks/WFILE_f.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/js/Sinks/WFILE_f.js b/js/Sinks/WFILE_f.js
index 4c919d7a..62ea59fb 100644
--- a/js/Sinks/WFILE_f.js
+++ b/js/Sinks/WFILE_f.js
@@ -15,9 +15,9 @@ function WFILE_f() {
this.model.ipar = new ScilabDouble([length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"WFILE_f\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"WFILE_f\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
WFILE_f.prototype.details = function WFILE_f() {
@@ -37,6 +37,7 @@ function WFILE_f() {
this.fname1 = parseFloat(arguments[0]["fname1"])
this.frmt1 = parseFloat(arguments[0]["frmt1"])
this.N = parseFloat(arguments[0]["N"])
+ this.exprs = arguments[0]["exprs"]
warnobsolete("WRITEC_f","6.0.0");
var warnMessage = msprintf(_("Feature %s is obsolete."),"WFILE_f");
var warnAdvise = msprintf(_("Please use %s instead."),"WRITEC_f");
@@ -44,14 +45,14 @@ function WFILE_f() {
warnBlockByUID(arg1.model.label,warnXcosMessage);
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
var dstate = this.model.dstate;
var lunit = dstate[2-1];
- var fname = exprs[2-1];
- var frmt = exprs[3-1];
+ var fname = this.exprs[2-1];
+ var frmt = this.exprs[3-1];
while (true) {
- [ok,this.in1,this.fname1,this.frmt1,this.N,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WFILE_f")],[" "],["Write to output file"],[" "],["Write is done on:"],["  - A binary file if no format given"],["  - A formatted text file if a format (Fortran type) is given"]],["Input Size","Output File Name","Output Format","Buffer Size"],list("vec",1,"str",1,"str",1,"vec",1),exprs);
+ [ok,this.in1,this.fname1,this.frmt1,this.N,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WFILE_f")],[" "],["Write to output file"],[" "],["Write is done on:"],["  - A binary file if no format given"],["  - A formatted text file if a format (Fortran type) is given"]],["Input Size","Output File Name","Output Format","Buffer Size"],list("vec",1,"str",1,"str",1,"vec",1),this.exprs);
if (!ok) {
break;
}
@@ -96,7 +97,7 @@ function WFILE_f() {
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
this.model.dep_ut = new ScilabDouble([true,false]);
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;