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

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

[Octave-bug-tracker] [bug #46536] Bad indexing could produce more inform


From: Rik
Subject: [Octave-bug-tracker] [bug #46536] Bad indexing could produce more informative error messages
Date: Tue, 15 Dec 2015 17:59:37 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #10, bug #46536 (project octave):

@Lachlan: jwe expressed an opinion, and it was to keep your patch as is.

I made a tiny tweak which is to rename the temporary variable tmp_XXX rather
than my_XXX.  That's just a convention I like because it indicates the purpose
of the variable in the name.  Having programmed in Perl quite a bit, I also
recognize "my" as a way to get a locally instantiated copy of a variable.  But
I don't think that convention is as widespread as the other.

Anyways, I'm uploading a version 4 of the cset back to this bug report for you
to review.

Currently it fails to pass tests in test/index.tst.  For example:


abc = [1 2];
abc(-1)(1)(1)
error: abc<...>(-1): subscripts must be either integers 1 to (2^31)-1 or
logicals

Expected: "abc(-1): subscripts"
Observed: "abc<...>(-1): subscripts"


It seems like for multiple levels of indexing where it is the first instance
that is incorrect it would be nice to not use the '<...>' notation.  But if
that is hard then we could certainly skip it. 



(file #35753)
    _______________________________________________________

Additional Item Attachment:

File name: bug_46536.v4.cset              Size:5 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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