bugGNU Octave - Bugs: bug #46080, Unexpected warning from textscan()...

 
 

bug #46080: Unexpected warning from textscan() when headerlines is 0

Submitted by:  None
Submitted on:  Wed 30 Sep 2015 03:47:25 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: FixedAssigned to: Philip Nienhuis <philipnienhuis>
Originator Name: Ethan BieryOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.0
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 02 Oct 2015 03:33:03 PM UTC, comment #5:

contributors.in cs also pushed:
http://hg.savannah.gnu.org/hgweb/octave/rev/1d6ab08edcde

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 01 Oct 2015 08:43:31 PM UTC, comment #4:

Update cs to contributors.in attached.

(file #35029)

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 01 Oct 2015 08:35:57 PM UTC, comment #3:

Fixed in this cs:
http://hg.savannah.gnu.org/hgweb/octave/rev/66adbb6e88ad

I'll make a different cs for the contributors list.

Thanks

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 01 Oct 2015 07:09:02 PM UTC, comment #2:

OK I have a fix ready along the lines you sketched, also for textread that has the same code.

Would you like to be credited and have your name mentioned in the list of contributors? If yes would you object to your email being mentioned in the patch?

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 01 Oct 2015 04:48:34 PM UTC, comment #1:

I think your suggestion makes sense.

I'll look into it

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Wed 30 Sep 2015 03:47:25 PM UTC, original submission:

If the 'headerlines' property is used as an argument to the textscan() function, and the value of 'headerlines' is 0, a warning is created:

(This may be the case if the "0" is actually a variable computed elsewhere in the code. The current workaround--having to check for a zero value, and subsequently call textscan() without the headerlines argument--seems inelegant).

The fix seems simple in textscan.m:

This will clear out the headerlines value during the subsequent call to strread (eliminating the warning), regardless of whether it's positive, negative, or zero.

Anonymous

 

(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 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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Oct 2015 08:43:31 PM UTCphilipnienhuisAttached File-=>Added contributors_EthanBiery.cs, #35029
    Thu 01 Oct 2015 08:35:57 PM UTCphilipnienhuisStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Thu 01 Oct 2015 07:09:19 PM UTCphilipnienhuisStatusConfirmed=>In Progress
    Thu 01 Oct 2015 07:09:02 PM UTCphilipnienhuisOperating SystemMicrosoft Windows=>Any
    Thu 01 Oct 2015 04:48:34 PM UTCphilipnienhuisStatusNone=>Confirmed
      Assigned toNone=>philipnienhuis

    Back to the top


    Powered by Savane 3.1-cleanup1