| View previous topic :: View next topic |
| Author |
Message |
joke Voice
Joined: 19 Aug 2005 Posts: 13 Location: Karlsruhe
|
Posted: Sun Jun 18, 2006 4:20 am Post subject: local <-> global variable |
|
|
Hi guys,
is it possible to have a variable to be known in the whole script, but NOT in every script? I mean, can I have a variable between local and global?
For example: a part of test.tcl
---------------------------------------------------------------------------------
set x "bla"
proc test1 {...} {
puthelp "PRIVMSG #test-chan :$x"
}
proc test2 {...} {
puthelp "PRIVMSG #test-chan :$x"
}
---------------------------------------------------------------------------------
Is it possible to make the variable x known in both procedures (test1, test2) without making x global? I want to have x to be known in test.tcl but NOT in my other tcl scripts. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Jun 18, 2006 5:23 am Post subject: |
|
|
use namespaces _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|