[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #36658] acceptance of "global a = b"
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #36658] acceptance of "global a = b" |
Date: |
Fri, 29 Jun 2012 19:46:03 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 Iceweasel/10.0.5 |
Follow-up Comment #4, bug #36658 (project octave):
If you think that initialization should happen any time that a global
statement appears, then what should happen when the initializer appears in a
function body? For example, given the function
function f ()
global g = 13;
end
what should the value of g be after doing
global g = 42
f ()
?
Maybe having initializers is just bad design. When I introduced it to Octave,
I thought it would be helpful, but I realized that it could cause some
confusion.
As for the printing issue, I'm not sure what my reasoning was at the time. I
probably skipped printing of the initialization expression because the simple
global declaration doesn't print the current value either.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36658>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/