[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
clearing global variables
From: |
John W. Eaton |
Subject: |
clearing global variables |
Date: |
Wed, 6 Oct 2010 18:17:00 -0400 |
On 6-Oct-2010, Michael Johnson wrote:
| I'm new to this list, so please forgive me if this has been discussed. I
| searched through the mailing list history, but found no recent discussions of
| this issue.
|
| I am using octave 3.2.4 on Fedora 11, and I'm unable to clear global
| variables. I have a few questions: Am I doing something wrong? Is this
| intended behavior? Is this a bug? Here's some example code:
|
| octave:1> global VAR = 1;
| octave:2> clear all
| octave:3> global VAR = 0;
| octave:4> VAR
| VAR = 1
|
| I would really think VAR would be redefined to be 0 after the clear all...
This appears to work correctly with a copy of Octave built from the
current sources:
octave:1> global v = 1
octave:2> v
v = 1
octave:3> clear all
octave:4> v
error: `v' undefined near line 4 column 1
octave:4> global v = 0
octave:5> v
v = 0
jwe
- clearing global variables, Michael Johnson, 2010/10/06
- Re: clearing global variables, Dmitri A. Sergatskov, 2010/10/06
- Re: clearing global variables, Michael Johnson, 2010/10/06
- Re: clearing global variables, Fotios Kasolis, 2010/10/06
- Re: clearing global variables, Michael Johnson, 2010/10/06
- Re: clearing global variables, Francesco Potortì, 2010/10/07
- Newbie question: textread versus textscan, John Helly, 2010/10/16
- Re: Newbie question: textread versus textscan, Andy Buckle, 2010/10/17
- Re: Newbie question: textread versus textscan, c., 2010/10/17
clearing global variables,
John W. Eaton <=