[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46536] bad indexing produces different error
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #46536] bad indexing produces different error message in dev than default |
Date: |
Thu, 26 Nov 2015 15:57:52 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 |
Update of bug #46536 (project octave):
Status: None => In Progress
_______________________________________________________
Follow-up Comment #2:
@Lachlan: I like trying to give the programmer more help in finding their
errors, particularly as lots of the people using Octave are not professional
programmers but scientists, engineers, or other types.
I think your change helps quite a bit in that regard, but I did object to the
';'. ;)
I don't think we need to solve this perfectly. Before they were getting no
information, now they will be getting some, but trying to re-execute bits of
the parser seems like overkill.
I would say that if you can easily distinguish between the cases of 0
sublevels of indexing and more than 0 then have just two error messages.
x(-1)
error: x(-1); subscripts must be either integers 1 to (2^31)-1 or logicals
x.foo(-1);
error: x.<...>(-1): subscripts must be either integers 1 to (2^31)-1 or
logicals
x.foo(1).bar(-1);
error: x.<...>(-1): subscripts must be either integers 1 to (2^31)-1 or
logicals
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46536>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/