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

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

[Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenat


From: Rik
Subject: [Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array
Date: Tue, 28 Nov 2017 01:12:51 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #5, bug #52542 (project octave):

char() is located in libinterp/corefcn/strfcns.cc.  The opening lines are


  if (nargin == 0)
    retval = "";
  else if (nargin == 1)
    retval = args(0).convert_to_str (true, true,
                                     args(0).is_dq_string () ? '"' : '\'');
  else
    {


That suggests convert_to_str() has a problem, but it also means there is a
third case where multiple arguments are passed to the char function.  Indeed,
this fails as well in a different manner.


double ([char(ones(0,4), ones(4,0)); 'A'])
ans =

   65
   32
   32
   32
   32
   32




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52542>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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