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
ebgujm wrote:
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) ...
.
- Prev by Date: EXPECT Newbie needs help
- Next by Date: Need Help EXPECT Newbie
- Previous by thread: Re: What is the proper way to set variables so they can be used in tk?
- Next by thread: EXPECT Newbie needs help
- Index(es):