This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

How to check if a global variable exists inside a procedure?

Old posts that have not been replied to for several years.
Locked
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

How to check if a global variable exists inside a procedure?

Post by awyeah »

I know how to check how a file exists.

Code: Select all

if {[file exists $myfile]} {
And for arrays we can use if the array, list
exists

Code: Select all

if {[array exists $mylist]} {
But how to check if a global variable exists? inside
a different procedure, or even a local variable?

I am making a script which checks if a global
variable exists from another script, and then
it uses that variable for string matching purpose.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

see the manpages for 'info'
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Thanks... i'll do that.
Found it great.. quite simple!
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked