info globals
Gives the names of the global variables.
info globals ?PATTERN?
Description
Gives the name of each variable of the global namespace, from any scope. With PATTERN, the list has only the names that match it as a glob pattern. A PATTERN that starts with ::, such as ::x, is the same as the PATTERN with no ::.
The list has the variables that ztcl makes, such as tcl_platform.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| PATTERN | glob pattern | none | The names to keep. |
Returns
A list of variable names, with no ::.
Examples
% set gv 1; proc f {} {info globals gv}; f
gv
% set gv 1; info globals ::gv
gv
Errors
% info globals a b
wrong # args: should be "info globals ?pattern?"
-errorcode TCL WRONGARGS
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1