bugGNU Octave - Bugs: bug #33383, Cell array of objects missing cell...

 
 

bug #33383: Cell array of objects missing cell element labels

Submitter:  David Bateman <dbateman>
Submitted:  Mon 23 May 2011 11:03:46 PM UTC
 
Category:  Interpreter Severity:  2 - Minor
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  David Bateman Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Thu 05 Jan 2017 06:35:54 PM UTC, comment #2: 

This has been fixed on the development branch with the huge overhaul by jwe to disp and display.  I now get

octave:1> c = {"string", ftp("ftp.gnu.org")}
c =
{
  [1,1] = string
  [1,2] =

    <class ftp>
}

Rik <rik5>
Project Administrator
Thu 08 Dec 2016 04:04:05 AM UTC, comment #1: 

behavior still the same in 4.2.0. 

>> c = {"string", ones(2)}
c =
{
  [1,1] = string
  [1,2] =

     1   1
     1   1

}
>> c = {"string", ftp("ftp.gnu.org")}
c =
{
  [1,1] = string
FTP Object
 host: ftp.gnu.org
 user: anonymous
  dir: /
 mode: binary
}

and as mentioned below Matlab displays things in an entirely different manner:

>> c = {'string',ones(2)}
c =
  1×2 cell array
    'string'    [2×2 double]
>> c = {'string', ftp('ftp.gnu.org')}
c =
  1×2 cell array
    'string'    [1×1 ftp]

Nicholas Jankowski <nrjank>
Project Member
Mon 23 May 2011 11:03:46 PM UTC, original submission:  

Consider

c = {"string", ones(2)}

which prints

c =
{
  [1,1] = string
  [1,2] =

     1   1
     1   1

}

The labels like "[1,1]" are missing if the array contains an object. Consider

c = {"string", ftp("ftp.gnu.org")}
c =
{
  [1,1] = string
FTP Object
 host: ftp.gnu.org
 user: anonymous
  dir: /
 mode: binary
}

Unfortunately I see no easy way of treating it, as matlab doesn't print cell arrays in this manner and the matlab definition of the display function prints the label whereas octaves cell.cc(Cell:print_raw) method needs and alternative means of displaying the element contents with the printing of the element label treated elsewhere.

This is an annoyance rather than a blocking issue, but I thought I should document the issue in the bug tracker

D.

David Bateman <dbateman>
Project Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by dbateman (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 project members can vote.

     

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-05 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2012-02-27 rik5 StatusNone Confirmed
    2011-05-23 dbateman Priority5 - Normal 3 - Low

    Back to the top


    Powered by Savane 3.9