Eggheads: optional parameters in proc definition

CoolCold coolcold at coolcold.org
Fri Jul 16 20:21:54 CST 2004


Hello Jeff,

Saturday, July 17, 2004, 5:14:42 AM, you wrote:

JF> -----BEGIN PGP SIGNED MESSAGE-----
JF> Hash: SHA1

JF> CoolCold wrote:

JF> | Hello Eggdrop,
JF> |
JF> | Can anyone tell me - is there is a way to define proc with optional
JF> | parameter(s) ?
JF> |
JF> | proc test { param1 param2 (optional param3) } {
JF> | ....
JF> | }

JF> You were close.

JF> proc test {param1 param2 {param3 "default"}} {
JF>         puts "param1: $param1"
JF>         puts "param2: $param2"
JF>         puts "param3: $parms3"
JF> }

Xm...couldn't find this in proc description for tcl 8.3.4 at least.
can u give me link to man/info?

JF> test blah1 blah2
JF> test blah1 blah2 blah3

JF> -----BEGIN PGP SIGNATURE-----
JF> Version: GnuPG v1.2.4 (MingW32)
JF> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

JF> iD8DBQFA+H2CGi4Ni4h3f1YRAiRAAKCPqUYVxn839RSanFQboNfgS27tqwCfc4ri
JF> fSfYTMNJXNYRicbnA1G96PE=
JF> =1KTd
JF> -----END PGP SIGNATURE-----


Best regards,
CoolCold [COOLCOLD-RIPN]




More information about the Eggheads mailing list