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

[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 10:55:29 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #6, bug #57255 (project octave):

This is much better.  See below for the transcript of a testing session in
Octave. 


octave:1> counter = @() x += 1 ;
error: parse error:

  syntax error

>>> counter = @() x += 1 ;
                      ^
octave:1> counter = @() {x += 1 ; }
error: parse error:

  invalid use of operator += in anonymous function

>>> counter = @() {x += 1 ; }
                     ^


If I could have everything I wanted, it would be that the very clear error
message "invalid use of operator" would also be emitted in the first example
rather than the vaguer "syntax error".



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57255>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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