Re: Best way to set up a dict of defaults?
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Tue, 04 Sep 2007 17:37:48 -0000
On Sep 4, 4:50 pm, Twylite <twylite.cr...@xxxxxxxxx> wrote:
But some of the default values are calculated/derived rather than
static (say based on the name of the application, $argv0). What is
the best way for me to set up these defaults?
Am I missing something obvious; is there a better way?
Anything against procs ?
proc def {k v} {set ::deftab($k) $v}
def x 12
def log.file [foo [bar [baz]]]
-Alex
.
- References:
- Best way to set up a dict of defaults?
- From: Twylite
- Best way to set up a dict of defaults?
- Prev by Date: Re: tcllib: smtp date generation broken?
- Next by Date: Re: expect hangs at "\# "
- Previous by thread: Re: Best way to set up a dict of defaults?
- Index(es):
Relevant Pages
|