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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Managing choise in Tcl language

Status
Not open for further replies.

Houss

Programmer
May 22, 2003
1
US
Hi!
I'd like to know if it's possible to have the equivalent functions in Tcl:
"Select case true:
case name=...
case surname=...
End select.
"
thanks for the piece of information!
 
Code:
  set type [get_type]
  switch -exact -- $type   {
    name  { # what to do when $type == "name" }
    surname { # what to do when $type == "surname" }
    default { # what to do when $type != "name" && $type != "surname" }
  }

Manual page:

HTH

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top