Re: A subst-antial question
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: A subst-antial question

From: John Seal <sealj@indy.raytheon.com>
Date: Fri Apr 28 2006 - 15:01:16 CEST

Dan Smart wrote:
> I'm also going to take this opportunity to whine about how you can't
> create a multi-statement list and eval it.

You must mean something else.

% set multiStatementList {
> set foo(a) 1
> set foo(b) 2
> }

set foo(a) 1
set foo(b) 2

(bin) 2 % eval $multiStatementList
2
(bin) 3 % parray foo
foo(a) = 1
foo(b) = 2

I *do* understand what you mean about [list] escaping semicolons. My
solution has always been to build the script as a string and [append]
the semicolons instead of [lappend] them. The [join $listOfLists ";"]
solution also treats the script and the semicolons as strings.
Received on Sun Apr 30 03:30:32 2006