summaryrefslogtreecommitdiff
path: root/js/Sources/RFILE_f.js
diff options
context:
space:
mode:
authorSunil Shetye2018-07-18 16:28:24 +0530
committerSunil Shetye2018-07-18 17:07:40 +0530
commit975ae6706b4ac868425193cf25bcbbb268051b5d (patch)
treea08dfa09d5fa0ce9892b3aba84f7420cebc4f532 /js/Sources/RFILE_f.js
parent4d1e8bb193a7315a8fcfe1e09c33befdee660b7d (diff)
downloadsci2js-975ae6706b4ac868425193cf25bcbbb268051b5d.tar.gz
sci2js-975ae6706b4ac868425193cf25bcbbb268051b5d.tar.bz2
sci2js-975ae6706b4ac868425193cf25bcbbb268051b5d.zip
handle empty array in comparison
Diffstat (limited to 'js/Sources/RFILE_f.js')
-rw-r--r--js/Sources/RFILE_f.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js
index 8c3ce1b7..d0e2060a 100644
--- a/js/Sources/RFILE_f.js
+++ b/js/Sources/RFILE_f.js
@@ -67,7 +67,7 @@ function RFILE_f() {
var nout = size(this.outmask,"*");
if (prod(size(this.tmask1))>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Time Record Selection",strcat(string(this.tmask1.slice())," ")),"Empty matrix or scalar expected.");
- } else if (this.tmask1!=[]&&this.tmask1<1) {
+ } else if (this.tmask1.length!=0&&this.tmask1<1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d","Time Record Selection",this.tmask1),"Strictly positive integer expected.");
} else if (lunit>0&&min(length(frmt),1)!=min(length(this.frmt1),1)) {
block_parameter_error(["Simulation running !!! You cannot switch <br />between formatted and unformatted"],"End current simulation first.");
@@ -86,7 +86,7 @@ function RFILE_f() {
} else if (min(this.outmask)<1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s","Outputs Record Selection",strcat(string(this.outmask.slice())," ")),"Strictly positive indexes expected.");
} else {
- if (this.tmask1==[]) {
+ if (this.tmask1.length==0) {
var ievt = 0;
var cout = [];
this.tmask1 = 0;