Re: What is the proper way to set variables so they can be used in tk?
- From: Bryan Oakley <oakley@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 20 Nov 2005 18:01:52 GMT
I use the following to obtain data and set the variables: ... set records$d [split $sr ","] lassign $records$d \ userName password uid grp longName homeDir shell
Is there a reason you're choosing to use a dynamic variable name rather than an array? In my experience, dynamic variable names are almost never worth the trouble; arrays are much easier to use in such a situation:
set records($d) [split $sr ","] lassign $records($d) ...