tcl - how does it know that it's not a "variable" but rather a "string"? -


this script:

#!/usr/bin/expect  set a1 "aaa" set a2 "bbb" set a3 "ccc"  {set b 1} {$b<4} {incr b} {     set c \$a$b     send $c } 

output :

$a1$a2$a3 

i hoping replicate

send $a1 send $a2 send $a3 

the output should have been

aaabbbccc

and yet not.

i don't have interpreter handy, , little rusty tcl, that's remember should work, want deference varoiable value it's name:

set aaa "123" set bbb "aaa"  # supposed echo '123': puts [set $bbb]  

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -