octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58617] cell2struct silently truncates char ma


From: Rik
Subject: [Octave-bug-tracker] [bug #58617] cell2struct silently truncates char matrices
Date: Fri, 19 Jun 2020 15:12:35 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #58617 (project octave):

                  Status:                    None => Confirmed              
        Operating System:                     BSD => Any                    

    _______________________________________________________

Follow-up Comment #1:

This is most likely because string_value() member function of octave_value
class takes just the first row from a char array().

Long term fix is probably to fix the way this internal function works.  See
bug #49536 reported by Mike Miller.

As an aside, if you make this a cellstr then you get an error message which
makes sense


octave:3> cell2struct({[1,2]}, cellstr (['foo';'bar';'baz']))
error: cell2struct: number of FIELDS does not match dimension




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58617>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]