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

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

[Octave-bug-tracker] [bug #51698] Nested function fails to inherit a var


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #51698] Nested function fails to inherit a variable created with assignin
Date: Wed, 9 Aug 2017 07:32:38 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Update of bug #51698 (project octave):

                 Summary: Nested function fails to inherit a variable =>
Nested function fails to inherit a variable created with assignin

    _______________________________________________________

Follow-up Comment #3:

I'm not sure we should attempt to support assignin uses that add variables to
nested function scopes.  From the following documentation, it seems that this
is explicitly disallowed in Matlab:

https://www.mathworks.com/help/matlab/matlab_prog/variables-in-nested-and-anonymous-functions.html?s_tid=gn_loc_drop

The reason it works when you add the "disp (K)" in the testmy function is that
then the variable name is present in the symbol table when the function is
parsed, not just added later when the function is executed.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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