My Tech Notes
TCL: get the last or first element in a list
The following example shows how to get the last and first element of a list in TCL:
2 comments:
Tica2
March 8, 2013 at 10:30 AM
What about ?
puts [lindex $mylist end]
Reply
Delete
Replies
WXL
March 10, 2013 at 4:22 PM
Good catch. I did not know "end" can be used.
Thanks.
Delete
Replies
Reply
Reply
Add comment
Load more...
‹
›
Home
View web version
What about ?
ReplyDeleteputs [lindex $mylist end]
Good catch. I did not know "end" can be used.
DeleteThanks.