Jump to content
Sign in to follow this  
ybouan

Select Case Break

Recommended Posts

ybouan

The way the select...case keyword work is exactly like an If...ElseIf the only difference is the wording.

From the official doc: "If the expression is true the following statements up to the next Case or EndSelect statement are executed. If more than one of the Case statements are true, only the first one is executed."

I think it would be a lot more usefull to have it work more like a GOTO with the introduction of the word BREAK. The docs would then read

"If the expression is true the following statements up to the next BREAK or EndSelect statement are executed. If more than one of the Case statements are true, only the first one is executed."

It is a subtle difference but would be so neat.

PS: I certainly won' t (can't) make the change myself so don' t ask :-)

Share this post


Link to post
Share on other sites
JSThePatriot

The way the select...case keyword work is exactly like an If...ElseIf the only difference is the wording.

From the official doc: "If the expression is true the following statements up to the next Case or EndSelect statement are executed. If more than one of the Case statements are true, only the first one is executed."

I think it would be a lot more usefull to have it work more like a GOTO with the introduction of the word BREAK. The docs would then read

"If the expression is true the following statements up to the next BREAK or EndSelect statement are executed. If more than one of the Case statements are true, only the first one is executed."

It is a subtle difference but would be so neat.

PS: I certainly won' t (can't) make the change myself so don' t ask :-)

<{POST_SNAPBACK}>

If you search the forums you will notice that this subject has been discussed alot without a resolution in your favor :whistle:.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites
ybouan

If you search the forums you will notice that this subject has been discussed alot without a resolution in your favor :whistle:.

JS

<{POST_SNAPBACK}>

Oops, I had searched but I guess I am bad at searching because I could not find this in the forums.

I will have another look.

Thanks

Share this post


Link to post
Share on other sites
JSThePatriot

Oops, I had searched but I guess I am bad at searching because I could not find this in the forums.

I will have another look.

Thanks

<{POST_SNAPBACK}>

Not a problem. I wasnt saying it as if you should have searched and not posted :-D. I was just letting you know there are some good discussions about it on here some where, in case you felt like looking it up.

In the search criteria, just make sure you have all forums selected. It could have been in the chat forum I think.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites
Nutster

Take a look at the ContinueCase command in the beta and see if this does what you want.


David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Share this post


Link to post
Share on other sites
ybouan

Take a look at the ContinueCase command in the beta and see if this does what you want.

<{POST_SNAPBACK}>

I think this maybe just be what I need thanks

Share this post


Link to post
Share on other sites
JSThePatriot

Take a look at the ContinueCase command in the beta and see if this does what you want.

<{POST_SNAPBACK}>

Ah thanks. I didnt see that option. (of course I havent upgraded to the latest beta) thanks.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.