diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-10-26 10:09:57 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-12-02 09:04:54 +1000 |
commit | 064ec299a9f7b1016ed7c24e5a014d94271281b3 (patch) | |
tree | 65925898533b35a1e730f0dfb5eee57de7c5328a /jim_tcl.txt | |
parent | d160ac7e0cdd776e46c502ab1ad33aa5366acc99 (diff) | |
download | jimtcl-064ec299a9f7b1016ed7c24e5a014d94271281b3.zip jimtcl-064ec299a9f7b1016ed7c24e5a014d94271281b3.tar.gz jimtcl-064ec299a9f7b1016ed7c24e5a014d94271281b3.tar.bz2 |
Add the [exists] command
Especially simplifies checking for the existence of procs.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim_tcl.txt')
-rw-r--r-- | jim_tcl.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/jim_tcl.txt b/jim_tcl.txt index 0834a57..737485a 100644 --- a/jim_tcl.txt +++ b/jim_tcl.txt @@ -64,6 +64,7 @@ Since v0.63: 2. Add aio '$handle filename' 3. Add 'info channels' 4. The 'bio' extension is gone. Now 'aio' supports 'copyto'. +5. Add 'exists' command Since v0.62: @@ -2059,6 +2060,17 @@ option in 'catch') will be set to a list, as follows: The environment for the executed command is set from $::env (unless this variable is unset, in which case the original environment is used). +exists +~~~~~~ ++*exists ?-var|-proc|-command?* 'name'+ + +Checks the existence of the given variable, procedure or command +respectively and returns 1 if it exists or 0 if not. This command +provides a more simplified/convenient version of 'info exists', +'info procs' and 'info commands'. + +If the type is omitted, a type of '-var' is used. The type may be abbreviated. + exit ~~~~ +*exit* '?returnCode?'+ |