bugGNU Octave - Bugs: bug #34558, strread does not honor \n as...

 
 

bug #34558: strread does not honor \n as single-quoted delimiter

Submitted by:  Michael Goffioul <goffioul>
Submitted on:  Sat 15 Oct 2011 11:20:35 AM UTC  
 
Category: InterpreterSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Inaccurate Result
Status: FixedAssigned to: None
Originator Name: Open/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.

 

Mon 17 Oct 2011 02:47:32 AM UTC, comment #4:

2nd changeset is attached. This one calles do_string_escape() for single-quoted strings only.

(file #24159)

Ben Abbott <bpabbott>
Project Member
Sun 16 Oct 2011 05:29:31 PM UTC, comment #3:

Please will somebody also make this patch apply to
- whitespace
- endofline
arguments in strread?

(I'm sorry, I have a (hopefully temporary) dominant arm/shoulder muscle dysfunction after neck hernia surgery last week and for at least the next weeks I can spend only very short periods behind my keyboard each day :-( )

I'll have a look if this is also warranted for the format string (I can imagine one can have literals comprising \t or \0 etc there).

BTW MG's if clause should look more like

Philip Nienhuis <philipnienhuis>
Project Member
Sat 15 Oct 2011 08:28:37 PM UTC, comment #2:

I think John's proposal was better:

Michael Goffioul <goffioul>
Project Member
Sat 15 Oct 2011 08:10:55 PM UTC, comment #1:

I've attached a trivial changeset.

Any problems with this?

(file #24155)

Ben Abbott <bpabbott>
Project Member
Sat 15 Oct 2011 11:20:35 AM UTC, original submission:

The function strread does not honor \n as a delimiter when it is single-quoted.

While in Matlab, we see:

Michael Goffioul <goffioul>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #24159:  changeset.patch added by bpabbott (1KiB - application/octet-stream - 2nd changeset)
file #24155:  changeset.patch added by bpabbott (739B - application/octet-stream - 1st chagneset)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by philipnienhuis (Posted a comment)
  • -unavailable- added by bpabbott (Updated the item)
  • -unavailable- added by goffioul (Submitted the item)
  • -unavailable- added by goffioul
  •  

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

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 19 Oct 2011 09:37:58 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
      Summarystrread does not honor \\n as single-quoted delimiter=>strread does not honor \n as single-quoted delimiter
    Mon 17 Oct 2011 02:47:32 AM UTCbpabbottAttached File-=>Added changeset.patch, #24159
      Summarystrread does not honor \\n as single-quoted delimiter=>strread does not honor \n as single-quoted delimiter
    Sun 16 Oct 2011 05:29:31 PM UTCphilipnienhuisSummarystrread does not honor \\n as single-quoted delimiter=>strread does not honor \n as single-quoted delimiter
    Sat 15 Oct 2011 08:28:37 PM UTCgoffioulSummarystrread does not honor \\n as single-quoted delimiter=>strread does not honor \n as single-quoted delimiter
    Sat 15 Oct 2011 08:10:55 PM UTCbpabbottAttached File-=>Added changeset.patch, #24155
      StatusNone=>Patch Submitted
      Summarystrread does not honor \\n as single-quoted delimiter=>strread does not honor \n as single-quoted delimiter
    Sat 15 Oct 2011 11:20:36 AM UTCgoffioulCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1