[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46536] bad indexing produces different error
From: |
Lachlan Andrew |
Subject: |
[Octave-bug-tracker] [bug #46536] bad indexing produces different error message in dev than default |
Date: |
Thu, 26 Nov 2015 03:23:19 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 |
Follow-up Comment #1, bug #46536 (project octave):
Yes, the change was intentional.
I'll fix the ';' once I write a patch for a more serious bug. In dev, it
gives
octave:1> x.foo = 1:5
octave:2> x.foo(-1)
error: x(-1); subscripts must be either integers 1 to (2^31)-1 or logicals
which omits the ".foo". That isn't too bad, but if we use "x.foo(n).bar(m)",
it will just say "x(-1)" for either n or m being -1. Do you have suggestions
on how to handle that?
It seems overkill to re-execute the indexing (which may also give different
results, if ++, or -= were used). Would it be better to revert to a generic
message in those cases?
For the x.foo(-1) case, would it be better to trace one level down in the
execution, or perhaps report x.<...>(-1)?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46536>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/