beetlebug▾
/

info args

Gives the names of the arguments of a proc.

info args PROC

Description

Gives the name of each argument of the proc PROC, in order, with args last when the proc has it. A default value is not in the list: info default reads 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

ArgumentTypeDefaultDescription
PROCproc namerequiredThe proc.

Returns

A list of argument names.

Examples

% proc f {a {b 2} args} {}; info args f
a b args

% proc f {} {}; info args f

% namespace eval ns {proc q {a} {}}; info args ns::q
a

Errors

% info args nope
"nope" isn't a procedure
-errorcode NONE

% info args set
"set" isn't a procedure
-errorcode NONE

% info args
wrong # args: should be "info args procname"
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.1

See also