Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Splitting a string

Status
Not open for further replies.

zskater

Programmer
Apr 14, 2001
22
0
0
GB

when setting the variable testVar to the following expression

set testVar [eval .c coords $Move(utag)]


It returns a string containing the co ordinates of the rectangle that has been selected
on the canvas. eg. 80.0 140.0 160.0 260.0
How would i then split that variable up into the four seperate co-ordinate variables
x1 y1 x2 y2

Cheers
Steve
 
Code:
foreach {x1 y1 x2 y2} $testVar {}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top