[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error |
Date: |
Thu, 21 Nov 2019 14:49:50 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Follow-up Comment #8, bug #57255 (project octave):
I suppose that's fine. It's odd to me that my second example,
clear all
counter = @() {x += 1 ; }
produces the error about use of an operator in an anonymous function when, in
fact, the problem is that x is undefined. Whereas,
clear all
counter = @() x += 1;
produces only a syntax error.
If it was trivial to fix, I would have them both do the same thing.
Also, just presenting the interpreter with
clear all
x += 1
error: 'x' undefined near line 1, column 1
gives a more meaningful error message. Is it possible to throw the message
from the underlying parse error rather than just "syntax error"?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57255>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57255] += operator behaves differently to manual increment and ++ operator, Tasos Papastylianou, 2019/11/18
- [Octave-bug-tracker] [bug #57255] += operator behaves differently to manual increment and ++ operator, Mike Miller, 2019/11/18
- [Octave-bug-tracker] [bug #57255] "+=" not parsed correctly in anonymous function within cell array context, Rik, 2019/11/19
- [Octave-bug-tracker] [bug #57255] "+=" not parsed correctly in anonymous function within cell array context, John W. Eaton, 2019/11/19
- [Octave-bug-tracker] [bug #57255] "+=" not parsed correctly in anonymous function within cell array context, Rik, 2019/11/19
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error, Rik, 2019/11/19
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error, John W. Eaton, 2019/11/20
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error, Rik, 2019/11/21
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error, John W. Eaton, 2019/11/21
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error,
Rik <=
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error, John W. Eaton, 2019/11/22
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error, John W. Eaton, 2019/11/22
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error, Rik, 2019/11/22
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error, John W. Eaton, 2019/11/22
- [Octave-bug-tracker] [bug #57255] "+=" in anonymous function within cell array context should emit an error, Rik, 2019/11/23