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 

higher priority for case structure?

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



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Mon Jan 31, 2005 11:07 am    Post subject: higher priority for case structure? Reply with quote

Referring to Chris list of planed improvements, I would ask for a higher priority of

Quote:
A simple select/switch/case structure as an alternative to a series of ""else if"" statements. This might also help with the lack of support for the OR conjunction.


I'm working on a small project that requires a lot of checks of different cases. I used UNIX script in the past and found that the case structure helped much to improved readability of the scripts in comparison to structures like if ... elseif … elseif … fi.

What are your opinions?
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Jan 31, 2005 1:23 pm    Post subject: Reply with quote

I'm not sure if it would help, but you might try using the "if var in <matchlist>" command to help with your script. For example:

if color in red,orange,yellow
{
....
}
else if color in black,silver,gray,white
{
...
}
else ; Default for all colors not mentioned above.
{
...
}

The reason I suggest this alternative is that it might be a while before the switch/case syntax gets done, because there are some higher priority items on the list.
Back to top
View user's profile Send private message Send e-mail
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Mon Jan 31, 2005 4:19 pm    Post subject: Reply with quote

Thanks a lot,

That will help.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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