[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42651] Incorrect input validation for strings
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #42651] Incorrect input validation for strings |
Date: |
Mon, 30 Jun 2014 20:24:15 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 Iceweasel/29.0.1 |
Follow-up Comment #3, bug #42651 (project octave):
I agree that we should try to be consistent.
Note that
sort ([66, "A", 67], [66 65 67])
is the same as
sort ('BAC', [66, 65, 67])
since the conversion of the mixed numeric and character array happens when the
array is constructed.
For this particular example, maybe sort should warn when the two objects don't
have the same type? I would guess this warning would need to be disabled in
"traditional" mode.
Also, this brings up a couple of other issues. We already have an
"Octave:num-to-str" warning ID that is supposed to be enabled by default, but
I don't get any warning for the mixed numeric and character array
construction.
Also,
[ 66, "A", 67 ]
produces an sq_string object, not a dq_string. I'm not sure why that choice
was made.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42651>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/