Re: (newbie) calling a proc with a varying number of arguments
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: (newbie) calling a proc with a varying number of arguments

From: Gerald W. Lester <Gerald.Lester@cox.net>
Date: Tue Dec 20 2005 - 19:51:41 CET

Read the man/help page for the proc command.

Pay special attention to the second paragrah.

just80n@gmail.com wrote:
> hi all!
>
> I have a proc like this :
>
> proc doStuff {arg} {
> domystuff (puts, and lots of things)
> }
>
>
> the thing is:
>
> doStuff can be called like this
>
> doStuff onlyOneArg
>
> or like this:
>
> doStuff OneArg AnotherArg
>
> or like this:
>
> doStuff OneArg AnotherArg OhMyGodAThirdArg
>
> and I don't have any power over it
>
> How can I not get
> called "doStuff" with too many arguments error
>
> and pack all args into only one ?
>
Received on Fri Dec 23 19:02:34 2005