info body
Gives the body of a proc.
info body PROC
Description
Gives the body of the proc PROC as proc got it. PROC is a command name, looked up from the current namespace. A built-in command is not a proc and is an error.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| PROC | proc name | required | The proc. |
Returns
The body of the proc.
Examples
% proc f {a} {return $a}; info body f
return $a
Errors
% info body nope
"nope" isn't a procedure
-errorcode NONE
% info body
wrong # args: should be "info body procname"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1