bugGNU Octave - Bugs: bug #56927, textscan format '%q' does not...

 
 

bug #56927: textscan format '%q' does not produce Matlab-compatible results for corner case where pattern fails

Submitter:  Rik <rik5>
Submitted:  Fri 20 Sep 2019 06:58:40 PM UTC
   
 
Category:  Octave Function Severity:  2 - Minor
Priority:  1 - Later Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Fri 20 Sep 2019 06:58:40 PM UTC, original submission:  

Sample code to reporduce


textscan ('"a,b","c"trailing', '%q', 'delimiter', ',')
ans =
{
  [1,1] =
  {
    [1,1] = a,b
    [2,1] = c
    [3,1] = trailing
  }

}


In Matlab, there are only two outputs, not three, and the second output is "ctrailing".  In other words, the section of text not matching the pattern, but occurring before a delimiter, is appended to the last format match.

This is an obscure corner case and I am merely noting it, rather than suggesting it get fixed.

Rik <rik5>
Group administrator

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

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

    History

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-20 rik5 Priority5 - Normal 1 - Later

    Back to the top

    Powered by Savane 3.16-2753.
    Corresponding source code