Skip to content
Tcl Source Code View Ticket
Login

View Ticket

new [info] subcommand: formalargs

Closed / Rejected461635ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 24 years ago
Descriptionplain2001-09-14 19:17:08
[info args procname] does not return any default values.  

One must resort to iterating over the results from [info args], calling [info default] for each one, and build up a list.  

It would be more convenient to have an [info] subcommand in the core that accomplishes that feat.

I propose [info fullargs procname]:

proc t1 [list one [list two ""] args] {}
info fullargs t1 ;# ==> one {two {}} args
glennjnnplain2001-09-15 02:21:53
File Added - 10798: tclCmdIL.diff
glennjnnplain2001-09-15 02:23:28
File Added - 10799: info.n.diff
glennjnnplain2001-09-15 02:24:13
File Added - 10800: info.test.diff
dkfplain2001-09-17 16:33:10
Logged In: YES 
user_id=79902

This feature *requires* a TIP; I'm not too sure if I like
the name 'fullargs' either...  :^)

Implementation looks technically OK though.
nobodyplain2001-09-17 17:18:01
Logged In: NO 

I might suggest 'info args -withdefaults'.  If we only 
examine the option when there is a 4th argument, there are 
also no backwards compatibility issues with the unlikely 
possibility of a proc called '-withdefaults'.  -- Vince.
dkfplain2001-09-17 17:33:00
Logged In: YES 
user_id=79902

Why do you think I said it needed a TIP?  :^)
glennjnn Closed ticket [461635ffff]. [History diff]2002-08-31 01:27:48
glennjnn Ticket [461635ffff]: 2 changes [History diff]2002-08-31 01:27:49
dgp Open ticket [461635ffff]. [History diff]2003-03-20 06:33:37
dgpplain2003-03-21 12:05:12
File Added - 45592: 461635.patch

Logged In: YES 
user_id=80530

combined changes into one patch

updated patch to HEAD

corrected test numbering (tests should keep
the same ID over Tcl history)

Changed to [info formalargs] as last TIPped.
dgpplain2003-04-11 23:21:33
Logged In: YES 
user_id=80530

TIP 65 rejected.
Log in (anonymous is fine) to add a comment.

Attachments: