[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54423] Declaring a variable global erases its
From: |
Arnaud Delorme |
Subject: |
[Octave-bug-tracker] [bug #54423] Declaring a variable global erases its value in Octave but not in Matlab |
Date: |
Wed, 1 Aug 2018 17:02:27 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?54423>
Summary: Declaring a variable global erases its value in
Octave but not in Matlab
Project: GNU Octave
Submitted by: arnodelorme
Submitted on: Wed 01 Aug 2018 09:02:25 PM 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: 4.4.0
Operating System: Mac OS
_______________________________________________________
Details:
function testglobal()
evalin('base', 'a = [1:3];');
evalin('base','a');
evalin('base','global a');
evalin('base','a');
Running the function above in Matlab 2018a
testglobal
a =
1 2 3
Warning: The value of local variables may have been changed to match the
globals. Future versions of MATLAB will require that you declare a variable
to
be global before you use that variable.
> In testglobal (line 5)
a =
1 2 3
Running the function above in Octave 4.4.0
testglobal
a =
1 2 3
a = []
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54423>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54423] Declaring a variable global erases its value in Octave but not in Matlab,
Arnaud Delorme <=