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

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

[Octave-bug-tracker] [bug #47676] Cannot apply computed assignment to a


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #47676] Cannot apply computed assignment to a variable defined after the code was parsed (e.g., in a script)
Date: Mon, 13 Jun 2016 04:40:04 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #47676 (project octave):

                  Status:                    None => Patch Submitted        
                 Summary: Error applying multiplication-assignment operator to
variable defined in script => Cannot apply computed assignment to a variable
defined after the code was parsed (e.g., in a script)

    _______________________________________________________

Follow-up Comment #15:

Here is a patch that warns at parse time if A += B is parsed as A('+=', 'B'),
or similar.

I'd be grateful for some feedback, especially on the trade-off between
optimisation and readability.

This bug is more serious than I thought.  I thought that it was only triggered
if a script is called while another script or function is running.

However, it is also triggered if the variable is created from the command line
before a script is run, if an old version of the script is cached.  That means
that the script could be run, throwing a warning but not failing due to some
conditional code, and then be invoked again and fail without a warning.

(file #37458)
    _______________________________________________________

Additional Item Attachment:

File name: bug_47676_warn_cmd_operator.cset Size:3 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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