This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Is there a 'case' statement in tcl????

Old posts that have not been replied to for several years.
Locked
User avatar
droolin
Halfop
Posts: 64
Joined: Thu Jul 24, 2003 9:07 pm
Contact:

Is there a 'case' statement in tcl????

Post by droolin »

Im looking at some code I have, and the case statement would be great here. Does tcl also have this??


droolin
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: Is there a 'case' statement in tcl????

Post by user »

droolin wrote:Im looking at some code I have, and the case statement would be great here. Does tcl also have this??
Do you mean 'switch'?
Have you ever read "The Manual"?
User avatar
droolin
Halfop
Posts: 64
Joined: Thu Jul 24, 2003 9:07 pm
Contact:

might have the same function

Post by droolin »

Ok, after you said about the 'switch'. I looked it up in a tcl e-book that I have. That's exactly what I was looking for.
I have a bunch of different simple if statements I think would be better coded using the switch. Thank you. I've only ever seen the case statement in various languages, and wasnt sure what to look for in my e-book.

droolin
Locked