[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
semantics of global variables and exist()
From: |
Teemu Ikonen |
Subject: |
semantics of global variables and exist() |
Date: |
Wed, 1 Oct 2003 13:36:08 +0300 |
User-agent: |
Mutt/1.4.1i |
Hi everyone,
It seems that the semantics of declaring a global variable has changed
subtly between the CVS version and 2.1.50 (Debian packaged).
With 2.1.50 I get:
octave:1> global testvar
octave:2> exist("testvar")
ans = 0
With CVS version (last week):
octave:1> global testvar
octave:2> exist("testvar")
ans = 1
I have scripts which depend on this behaviour, so I'd like to know if this
is a bug or a feature.
Is there perhaps another way of determining (inside a function) whether a
global variable has been declared and set, than using exist()?
Best wishes,
Teemu
- semantics of global variables and exist(),
Teemu Ikonen <=