bugGNU Octave - Bugs: bug #49660, textscan line ending skipped

 
 

bug #49660: textscan line ending skipped

Submitted by:  None
Submitted on:  Mon 21 Nov 2016 12:44:10 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: InvalidAssigned to: None
Originator Name: Julius PoppOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.0
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 24 Nov 2016 09:49:29 PM UTC, comment #4:

So Octave is doing the correct thing here. Closing report.

Rik <rik5>
Project Administrator
Thu 24 Nov 2016 04:59:12 PM UTC, comment #3:

With Matlab r2016b:

Philip Nienhuis <philipnienhuis>
Project Member
Mon 21 Nov 2016 07:41:13 PM UTC, comment #2:

According to the documentation for Octave and the '%s' field specifier:

The documentation for REPEAT is

Thus,

should only read a single word which it does.

Verifying this with Matlab would be useful.

Rik <rik5>
Project Administrator
Mon 21 Nov 2016 06:44:14 PM UTC, comment #1:

The textscan function was rewritten for Octave 4.2 for performance and Matlab compatibility. I think the new behavior is correct, if you ask textscan for a single string with the default delimiter, you will get back a single word, not the entire first line. Do you have access to Matlab to test your examples for compatibility?

Mike Miller <mtmiller>
Project Administrator
Mon 21 Nov 2016 12:44:10 PM UTC, original submission:

data = textscan(fid, '%s',1) no longer returns the first line.

file:
s11 s12 s13\r\n
s21

example 1:

example 2:

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 24 Nov 2016 09:49:29 PM UTCrik5StatusNeed Info=>Invalid
      Open/ClosedOpen=>Closed
    Mon 21 Nov 2016 06:44:14 PM UTCmtmillerStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1