"David N. Welton" wrote:
[...]

>
> I don't like seperators.  It strikes me as being too arbitrary, and an
> inelegant solution, as well as something 'external' to the Tcl
> language.
>
> > Have you a better idea?
>
> Well, we could do something like this:
>
> if there are multiple variable values, create a list with sub-lists,
> so that you have something like:
>
> {this is comment 1} {this is comment 2} {this is comment 3}
>
> that seems more tcl-ish to me.  I suppose it might still be difficult
> to tell exactly what you have received.

In fact, we should handle the case x="{aa bb cc}" (the '{}` are part of
the string), perhaps not common, but not impossible.

>
> Hrm... brainstorming, there are some more radical solutions.  Place
> multiple variables in a different array... or even create a variable
> command:
>
> [ VARS key x ] for example...
>
> [ VARS num x ] tells you that there are 3 values.
>
> But that's definitely a more radical solution, and something that I'm
> not sure I want to implement without discussion.
>

To avoid breaking compatibility with existing scripts, we came to the
following
proposal:

- ::request::VARS(x) returns a list with sub-lists:
        {this is comment 1} {this is comment 2} {this is comment 3}

- a new variable ::request::VARSLISTS is added, containing a list
   of variable names that were assigned to more than one value. If
   your script knows that $x could be a list, it can simply look for
   'x' in $::request::VARSLISTS.

As an alternative, mod_dtcl could directly set the variables inside
the ::request:: namespace, but this could be a very radical solutio, too...



Valerio Gionco
<[EMAIL PROTECTED]>

--
****************************************************************************
            "Life's not fair, but the root password helps."




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to