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

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

[Octave-bug-tracker] [bug #38086] "clear all" does not clear variables d


From: Rik
Subject: [Octave-bug-tracker] [bug #38086] "clear all" does not clear variables defined on command line?
Date: Thu, 21 Feb 2013 00:02:46 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0

Update of bug #38086 (project octave):

                Severity:              3 - Normal => 2 - Minor              
                Priority:              5 - Normal => 1 - Later              

    _______________________________________________________

Follow-up Comment #6:

It's not a race condition, but it is odd.  I've downgraded the severity
because this isn't really damaging to anyone.

I believe the issue is that the single line, even with semicolons, is being
evaluated in a single temporary working space.

For example, try this code:


clear all; clc; i = 20; j = 10; whos; clear all; whos ; k = 30; whos; clear
all; whos


which results in


Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  ===== 
        i           1x1                          8  double
        j           1x1                          8  double
        k           0x0                          0  unknown

Total is 2 elements using 16 bytes

Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  ===== 
        i           0x0                          0  unknown
        j           0x0                          0  unknown
        k           0x0                          0  unknown

Total is 0 elements using 0 bytes

Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  ===== 
        i           0x0                          0  unknown
        j           0x0                          0  unknown
        k           1x1                          8  double

Total is 1 element using 8 bytes

Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  ===== 
        i           0x0                          0  unknown
        j           0x0                          0  unknown
        k           0x0                          0  unknown

Total is 0 elements using 0 bytes


What is interesting is that k has not even been defined for the first
execution of 'whos' and yet it is still showing up in the symbol table.


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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