[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50716] Undefined input to a classdef method
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #50716] Undefined input to a classdef method |
Date: |
Wed, 5 Apr 2017 08:00:16 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #3, bug #50716 (project octave):
Yes, this error is happening because of "end" in the indexing expression.
Suppose you have
s.a = [1,2,3,4];
Then to evaluate the expression
s.a(2:end-1)
you need to know the number of elements of "s.a", so you have to evaluate that
first. It's as if you had the expression
s.a (2:numel(s.a)-1)
But the meaning of this expression is different if "s.a" is a object method
call instead of a struct indexing operation.
It's tempting to try to transform "end" expressions when they are parsed, but
it is not that simple and must be done when the expression is evaluated.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50716>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, Guillaume, 2017/04/04
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, Mike Miller, 2017/04/04
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, Guillaume, 2017/04/05
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method,
John W. Eaton <=
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, John W. Eaton, 2017/04/05
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, Guillaume, 2017/04/05
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, John W. Eaton, 2017/04/05
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, John W. Eaton, 2017/04/05
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, Guillaume, 2017/04/05
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, John W. Eaton, 2017/04/05
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, Carnë Draug, 2017/04/05
- [Octave-bug-tracker] [bug #50716] Undefined input to a classdef method, John W. Eaton, 2017/04/05