bugGNU Octave - Bugs: bug #36398, textread & strread ML...

 
 

bug #36398: textread & strread ML compatibility in some corner cases (incomplete first data line)

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Fri 04 May 2012 05:50:27 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 22 Jun 2012 06:03:40 PM UTC, comment #1: 
Philip Nienhuis <philipnienhuis>
Group Member
Fri 04 May 2012 05:50:27 PM UTC, original submission:  

If the very first line of a data file (-string) is already incomplete, textread and strread choke on it.
Example:


octave:4> D = textscan ([char(10)], '%f %f')
error: textscan: subscript indices must be either positive integers or logicals
error: called from:
error: C:\Programs\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\io\textscan.m at line 256, column 12


or


octave:4> [a, b] = strread (['Empty'], 'Empty%f %f')
warning: strread: unable to parse text or file with given format string
error: some elements undefined in return list
error: called from:
error: C:\Programs\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\io\textscan.m at line 266, column 9


Changeset attached (depends on that of bug # 36356)

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #25787:  textread_textscan4.patch added by philipnienhuis (3KiB - application/x-download)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-06-22 philipnienhuis StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2012-05-04 philipnienhuis Attached File- Added textread_textscan4.patch, #25787

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code