bugGNU Octave - Bugs: bug #47458, textscan.cc Matlab incompatibility

 
 

bug #47458: textscan.cc Matlab incompatibility

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Fri 18 Mar 2016 07:04:33 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: Lachlan Andrew <lachlan>
Originator Name: Philip NienhuisOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Fri 25 Mar 2016 03:43:03 PM UTC, comment #6:

I pushed it here:
http://hg.savannah.gnu.org/hgweb/octave/rev/936ab0fca2f7

Closing report

Philip Nienhuis <philipnienhuis>
Project Member
Tue 22 Mar 2016 09:20:25 PM UTC, comment #5:

Tested on Linux and Windows 7, works fine.

Thanks for fixing, Lachlan.
Will you push & close this report, please?

Philip Nienhuis <philipnienhuis>
Project Member
Tue 22 Mar 2016 09:48:53 AM UTC, comment #4:

Here is the rebased patch. Thanks for letting me know where things had moved to.

(file #36723)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Tue 22 Mar 2016 12:26:20 AM UTC, comment #3:

This patch fails to apply to the current textscan, it's been integrated into libinterp/corefcn/{file-io,oct-stream}.{cc,h} now. If you have time could you rebase your change onto the current default branch?

Mike Miller <mtmiller>
Project Administrator
Sun 20 Mar 2016 11:42:22 PM UTC, comment #2:

Thanks, Philip and Mike.

The attached patch causes a line of emptyVal (NaN by default) if the final line didn't have any valid conversions but did match a literal before the first conversion. I assume that is the required behaviour.

(file #36703)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Sat 19 Mar 2016 07:06:31 AM UTC, comment #1:

Just checked after latest batch of textscan cleanups and confirm this is still the same result.

Mike Miller <mtmiller>
Project Administrator
Fri 18 Mar 2016 07:04:33 PM UTC, original submission:

With new textscan.cc in dev:

Expected is {NaN, NaN}.

Adding any digit goes some way in the right direction:

Matlab r2016a prerelease gives:
+verbatim-

>> format compact
>> U = textscan (['Empty' char(10)], 'Empty%f %f')

U =
[NaN] [NaN]
-verbatim-

Philip Nienhuis <philipnienhuis>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lachlan (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by philipnienhuis (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 25 Mar 2016 03:43:03 PM UTCphilipnienhuisStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Tue 22 Mar 2016 09:48:53 AM UTClachlanAttached File-=>Added bug_47458_literal_only.v1.cset, #36723
    Sun 20 Mar 2016 11:42:50 PM UTClachlanStatusConfirmed=>Patch Submitted
      Assigned toNone=>lachlan
    Sun 20 Mar 2016 11:42:22 PM UTClachlanAttached File-=>Added bug_47458_literal_only.cset, #36703
    Sat 19 Mar 2016 07:06:31 AM UTCmtmillerStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1