On 5/28/05, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote: > > Am 28.05.2005 um 13:36 schrieb Stephen Deasey: > > > > > I think it looks like 'flag' is the literal default value for the > > -eightbit option. I do like the idea of lists, it is more Tcl-like. > > But Tcl already has a syntax for procs, and this clashes with it. > > > > Oh it does not! > > {{-eightbit flag}} > > This is the correct syntax. If you wanted to have a default > it would be something like > > {{-eightbit flag} 1}
ns_parseargs {{-eightbit flag} {-foo flag} args} How do you distinguish between -eightbit which is a boolean flag, and -foo which is an option with a default string value of 'flag'? I don't know that it makes much sense to supply a default for boolean flags. In that case you probably want to invert the sense of the flag name: -nofoo.