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

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

[Octave-bug-tracker] [bug #54423] Declaring a variable global erases its


From: Rik
Subject: [Octave-bug-tracker] [bug #54423] Declaring a variable global erases its value in Octave but not in Matlab
Date: Wed, 1 Aug 2018 18:55:47 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Update of bug #54423 (project octave):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

This has already been changed for the 4.4.1 bug fix release.


octave:3> version
ans = 4.4.1-rc2
octave:4> testglobal
a =

   1   2   3

warning: global: 'a' is defined in the current scope
warning: called from
    testglobal at line 5 column 1
warning: global: in a future version, global variables must be declared before
use
warning: called from
    testglobal at line 5 column 1
warning: global: existing local value used to initialize global variable
warning: called from
    testglobal at line 5 column 1
a =

   1   2   3



The reporting is a little verbose because "backtrace" is turned on for every
single line, but nevertheless the behavior is the same.

Marking as fixed and closing report.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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