New warning ID "Octave:charmat-truncated"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

New warning ID "Octave:charmat-truncated"

Rik-4
While fixing bug #49536, I added a new warning ID to Octave.  The documentation is:

'Octave:charmat-truncated'
     If the 'Octave:charmat-truncated' warning is enabled, a warning is
     printed when a character matrix with multiple rows is converted to
     a string.  In this case, the Octave interpreter keeps only the
     first row and discards the others.  By default, the
     'Octave:charmat-truncated' warning is enabled.

A situation where this might happen is the following

charmat = ["ab"; "cd"; "ef"];
strcmp ({charmat}, "cd")

I ran 'make check' and everything passes, but if you find in running your own code that you are getting this warning emitted from core Octave functions then please file a bug report.  It is almost always something we would prefer to fix rather than have strange, non-inuitive behavior.

--Rik