|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #57604] clear -v clears everything |
Date: | Wed, 15 Jan 2020 12:46:50 -0500 (EST) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Update of bug #57604 (project octave): Item Group: None => Matlab Compatibility Status: None => Works For Me _______________________________________________________ Follow-up Comment #1: Do you have a test case that demonstrates this? I used a global variable to check and it works fine. octave:1> global gvar; octave:2> gvar = 1; octave:3> lvar = 2; octave:4> whos Variables in the current scope: Attr Name Size Bytes Class ==== ==== ==== ===== ===== ans 1x20 20 char g gvar 1x1 8 double lvar 1x1 8 double Total is 22 elements using 36 bytes octave:5> clear -v octave:6> whos octave:7> global gvar octave:8> whos Variables in the current scope: Attr Name Size Bytes Class ==== ==== ==== ===== ===== g gvar 1x1 8 double Total is 1 element using 8 bytes octave:9> gvar gvar = 1 The local variable which is an instance of the global variable is removed by the clear statement. But the global variable is not cleared, and can be re-accessed by declaring a local instance again. This is the same behavior I see in Matlab. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?57604> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |