octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52594] textscan continues past EOL


From: Ashwin Shrestha
Subject: [Octave-bug-tracker] [bug #52594] textscan continues past EOL
Date: Tue, 5 Dec 2017 22:26:59 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?52594>

                 Summary: textscan continues past EOL
                 Project: GNU Octave
            Submitted by: niwhsa
            Submitted on: Wed 06 Dec 2017 03:26:57 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Ash
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Textscan continues to read past EOL if the format specifier contain more
element than the line has. 

For example using the code below:

textscan(file_current, '%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s', 2,
'delimiter', ',','EndofLine','\r\n')


if i read something that has 16 values in a CSV, it would go to the next line
and continue reading to fill the remaining "%s" are completely filled,
ignoring the EOL at the end of line 1.

This code has been tested in Matlab and behaved differently. It would continue
to read until EOL and fill the remaining elements with NaN. This would
preserve the location of all the strings in the CSV. 

Thanks,
Ashwin




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52594>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]