AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Switch Case statement

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
domhnull



Joined: 18 Sep 2004
Posts: 4
Location: Lacey, WA

PostPosted: Fri Oct 08, 2004 2:14 pm    Post subject: Switch Case statement Reply with quote

Any chance to implement a switch/case statement?

Ex.:

Switch (var) {
case 1:
; do something
return
case 2:
; do something else
return
default:
; if no matches do this
return
}
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Fri Oct 08, 2004 6:03 pm    Post subject: Reply with quote

It's on the list. I've additionally made a note of your example, thanks.

In the meantime, you probably know you can use the more cumbersome "else if" tree to get exactly the same behavior. In this case, the final "else" in the tree corresponds to the "default" item in the switch.
Back to top
View user's profile Send private message Send e-mail
domhnull



Joined: 18 Sep 2004
Posts: 4
Location: Lacey, WA

PostPosted: Fri Oct 08, 2004 11:24 pm    Post subject: Reply with quote

Yep, I knew. Just like the switch/case format. Thanks! Fantastic program, BTW
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group