info constantTcl 9.1 only
Tells if a variable is a constant of const.
info constant VAR
Description
Gives 1 when VAR is a variable that const made, and 0 for each other variable and for a name with no variable.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| VAR | variable name | required | The variable. |
Returns
1 or 0.
Examples
% const k 1; info constant k
1
% set v 1; info constant v
0
% info constant nope
0
Errors
% info constant
wrong # args: should be "info constant varName"
-errorcode TCL WRONGARGS
% info constant a b
wrong # args: should be "info constant varName"
-errorcode TCL WRONGARGS
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 only.
- Since
- ztcl 1.0.0-beta.1