Reply To: TCL — referencing "variable" variables

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf TCL — referencing "variable" variables Reply To: TCL — referencing "variable" variables

#58757
Jim Kosloskey
Participant

    Todd,

    Have you tried subst?

    Such as (assuming recBsnd has a value of 1)

    echo [array get [subst $thrd] recBsnd]

    which will return the key and value (as a list) – recBsnd 1

    or if you just want the value:

    echo [lindex [array get [subst $thrd] recBsnd

    which will return 1 from the get list

    Jim Kosloskey

    email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.