[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to detect global vars before calling global?
From: |
Eric Chassande-Mottin |
Subject: |
how to detect global vars before calling global? |
Date: |
Fri, 3 Oct 2003 13:55:23 +0000 (GMT) |
is it possible to know that a global variable exists
before to create it in the local workspace of a function?
with is_global, it seems impossible.
octave2.1:1> x=1;global x;
octave2.1:2> is_global("x")
ans = 1
octave2.1:3> function foo(y);is_global("x"),end;
octave2.1:4> foo(0)
ans = 0
cheers,
é.
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- how to detect global vars before calling global?,
Eric Chassande-Mottin <=