![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.tcl archiveRe: (newbie) calling a proc with a varying number of arguments
From: <slebetman@yahoo.com>
Date: Thu Dec 22 2005 - 03:17:55 CET
just80n@gmail.com wrote:
Other people have already provided the correct answer of using args as
Try the following:
proc doStuff {arg1 {arg2 "hello"} args} {
doStuff
doStuff OneArg
doStuff OneArg AnotherArg
doStuff OneArg AnotherArg OhMyGodAThirdArg
doStuff OneArg AnotherArg OhMyGodAThirdArg FourthArg "and arg 5"
As others have stated, the args parameter will return all remaining
|