[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43470] in place operation gives error: index
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds |
Date: |
Tue, 28 Oct 2014 18:05:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.0 |
Follow-up Comment #6, bug #43470 (project octave):
I believe I've fixed the immediate problem with this changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/a3eead909bf9
There will still be a cryptic error message if the script (or a function)
contains the lines
load x.mat
x +=...
This happens because the script (or function) is parsed completely prior to
evaluation. At that point, X is not known to be a variable, so the statement
"x +=..." looks like a command so it is transformed to an indexing expression.
Later when it is evaluated, X is a variable, so the indexing expression
succeeds, but the "+=" argument is transformed to a numeric argument to
perform the indexing and the cryptic message about the index being out of
range is generated.
One "solution" to this problem would be to change Octave so that the parser
generates a "function call" in this instance instead of an "index expression"
(which can be either a function call or a variable index). Then the message
would be something to the effect of "undefined function 'x'".
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43470>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds, anonymous, 2014/10/24
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds, John W. Eaton, 2014/10/24
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds, John W. Eaton, 2014/10/24
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds, John W. Eaton, 2014/10/24
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds, Rik, 2014/10/27
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds, John W. Eaton, 2014/10/27
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds,
John W. Eaton <=
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds, Rik, 2014/10/28
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds, Hartmut, 2014/10/29
- [Octave-bug-tracker] [bug #43470] in place operation gives error: index out of bounds, Rik, 2014/10/29