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

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

Re: [Octave-bug-tracker] [bug #36658] acceptance of "global a = b"


From: Levente Torok
Subject: Re: [Octave-bug-tracker] [bug #36658] acceptance of "global a = b"
Date: Sun, 1 Jul 2012 23:40:59 +0200

Hi John,

I would vote on 13.
What would make you think of 42, other than universe and everything?

Lev


On Fri, Jun 29, 2012 at 9:46 PM, John W. Eaton <address@hidden> wrote:
> 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/
>



reply via email to

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