On 05/17/2013 04:02 AM,
chenyo...@gmail.com wrote:
> puts "chk point1.2: pArr(value) is $pArr(value)";
> eval "set pArr(value) \[$pArr(value)\]";
> puts "chk point1.3: pArr(value) is $pArr(value)";
>
> what does this eval "set pArr(value) \[$pArr(value)\]" mean? I have tried this code and got output as
That should be more clearly written as the equivalent:
set pArr(value) [eval $pArr(value)]
For the particular example, this would do as well, though it's not
precisely the same:
set pArr(value) [{*}$pArr(value)]
Just as a general observation, if you see example Tcl code with both a
semicolon and a newline terminating each command, don't expect it to be
the most idiomatic of examples. Get your role models somewhere else.
--
| Don Porter Applied and Computational Mathematics Division |
|
donald...@nist.gov Information Technology Laboratory |
|
http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|