Answers for "how to dereference a variable twice in tcl"

0

how to dereference a variable twice in tcl

set jo jim
  puts $$jo ;# returns "$jim"
  puts [subst $$jo] ;# returns "can't read "jim": no such variable"
  set fred jo
  puts [subst $$fred] ;# returns "jim"
Posted by: Guest on July-17-2020

Browse Popular Code Answers by Language