bugGNU Octave - Bugs: bug #44981, strcat: allow call with empty...

 
 

bug #44981: strcat: allow call with empty argument list

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 01 May 2015 03:03:16 PM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 06 May 2015 11:33:28 AM UTC, comment #2: 
Carnë Draug <carandraug>
Group Member
Fri 01 May 2015 03:27:14 PM UTC, comment #1: 

Attached suggested changeset.

In strvcat the changes are mostly dropping the indentation one level. I simply dropped the check for nargin which automatically makes it loop zero times and return an empty string.

On the case of strcat and cstrcat because [cellstr{:}] returns an empty matrix of class double, I was more specific.

(file #33857)

Carnë Draug <carandraug>
Group Member
Fri 01 May 2015 03:03:16 PM UTC, original submission:  

As noted in bug #44978, horzcat and vertcat both allow empty argument lists and return an empty matrix. Shouldn't strcat do the same?

This change will technically make strcat Matlab incompatible (in that it doesn't throw an error) but I think we've agreed that it's ok in general for Octave to do something different when it's fed something that would be an error in Matlab.

This should be an easy fix, but let's see if there are any strong opinions about whether this should be done or not.

Mike Miller <mtmiller>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33857:  allow-empty-arguments-strcat.cset added by carandraug (6KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (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
    2015-05-06 carandraug StatusPostponed Fixed
        Open/ClosedOpen Closed
    2015-05-01 carandraug Attached File- Added allow-empty-arguments-strcat.cset, #33857

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code