[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54052] the global statement clears previously
From: |
Lars Kindermann |
Subject: |
[Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values |
Date: |
Mon, 4 Jun 2018 03:23:36 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0 |
URL:
<http://savannah.gnu.org/bugs/?54052>
Summary: the global statement clears previously assigned
values
Project: GNU Octave
Submitted by: larskindermann
Submitted on: Mon 04 Jun 2018 07:23:35 AM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
>> a=1
a = 1
>> global a
>> a
a = [](0x0)
>>
Matlab will retain the previous value instead but issue a warning, according
to its documentation.
The Octave documentation does not specify what behaviour to expect.
In addition, I don't understand what the help
>> help global
-- global VAR
Declare variables to have global scope.
global X;
if (isempty (X))
x = 1;
endif
See also: persistent.
intents to explain. It would make some sense to me if the last x was
uppercase, too?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54052>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values,
Lars Kindermann <=
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, Mike Miller, 2018/06/04
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, Lars Kindermann, 2018/06/04
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, Mike Miller, 2018/06/04
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, Rik, 2018/06/13
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, Michael Godfrey, 2018/06/13
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, Mike Miller, 2018/06/13
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, Markus Mützel, 2018/06/14
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, Mike Miller, 2018/06/14
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, John W. Eaton, 2018/06/14
- [Octave-bug-tracker] [bug #54052] the global statement clears previously assigned values, Michael Godfrey, 2018/06/14