Skip to content

Instantly share code, notes, and snippets.

@xtman
Last active December 14, 2015 11:39
Show Gist options
  • Save xtman/5081129 to your computer and use it in GitHub Desktop.
Save xtman/5081129 to your computer and use it in GitHub Desktop.
The example shows how to get the last and first element of list in TCL.
set mylist "1 2 3 4 5"
# prints the last element of mylist: 5
puts [lindex $mylist end]
# prints the first element of mylist: 1
puts [lindex $mylist 0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment