Re: Why isn't "dash" a wordchar?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Why isn't "dash" a wordchar?

From: Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>
Date: Wed Mar 29 2006 - 19:41:12 CEST

Adrian Ho <tcl@03s.net> wrote:
> On 2006-03-27, Bob Binder <nospam@domain.com> wrote:
>> Although this behavior is apparently consistent with the cited Unicode
>> standard, it is inconvenient. I'd like a built-in string class that
>> recognizes all valid Tcl names, including option identifiers with their
>> leading dash, the dollar sign, etc.

> If by "valid Tcl names" you mean "valid Tcl identifiers", then pretty
> much *all* characters (including whitespace) are legal in one (some form
> of escaping may of course be necessary in certain cases).

Exceptions: a pair of parenthesis "(...)", whose closing
                 one is right at the end of the "varname"
             and two subsequent colons "::"
             may induce some meta-meaning.
These *can* be contained in valid varnames, but not arbitrarily.

e.g.
  "abc)))(((())))(((" is a valid (non-array) varname
  "abc)))(((())))((()" denotes an arrayelement "((())))(((" of
                        an array named "abc)))"
Received on Sun Apr 30 02:52:53 2006