Re: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III
Len, I just checked and unless I missed something there is no choice for multi-line selection in the ComboBox. Tom On Mar 20, 2008, at 12:31 PM, [EMAIL PROTECTED] wrote: If I'm not mistaken (and I frequently am), isn't there an option on comboboxes to allow multi-line selections? Or is th

Re: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III
Mark, I saw it in a sample stack and have used it since. grin So, You're saying Break is the way to go. period. All four characters of it! Thanks Tom On Mar 20, 2008, at 2:15 PM, Mark Wieder wrote: Tom- If I want to leave a switch statement after successfully matching a case is it bet

Re: Exit Switch or break switch question

2008-03-20 Thread Stephen Barncard
I've used "exit switch" myself... then 'cleaned it up' later... for no reason... but it works. Tom- If I want to leave a switch statement after successfully matching a case is it better to break and rund to the end without a default statement or to exit the switch from that case? Yi

Re: Exit Switch or break switch question

2008-03-20 Thread Eric Chatonet
Hello Mark, Le 20 mars 08 à 19:19, Mark Wieder a écrit : Eric- Break skips the rest of the current switch structure and goes to the statement following the end switch. Only four chars to write ;-) Which four? -- Mark Wieder LOL and LOL :-) Probably in French... I have so much progresses t

Re: Exit Switch or break switch question

2008-03-20 Thread Mark Wieder
Eric- Break skips the rest of the current switch structure and goes to the statement following the end switch. Only four chars to write ;-) Which four? -- Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev

Re: Exit Switch or break switch question

2008-03-20 Thread Mark Wieder
Tom- > If I want to leave a switch statement after successfully matching a case > is it better to break and rund to the end without a default statement or > to exit the switch from that case? Yikes! I had no idea the compiler would accept "exit switch"! I'm sure it compiles it as an alias f

Re: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III
Eric, Thanks, I agree with your preference here and will stick to the break for this button. And, Yes I really like the flexibility of the switch structure. Thanks again, I really appreciate your feedback on this. Tom McGrath On Mar 20, 2008, at 11:33 AM, Eric Chatonet wrote: Hello Tom,

Re: Exit Switch or break switch question

2008-03-20 Thread len-morgan
If I'm not mistaken (and I frequently am), isn't there an option on comboboxes to allow multi-line selections? Or is that just the option menu? len morgan > Hi Len, > > Multiple exit points seems like a good point for clarity unless maybe > the switch is very very long then you would know if one

Re: Exit Switch or break switch question

2008-03-20 Thread Eric Chatonet
Hello Tom, Le 20 mars 08 à 16:21, Thomas McGrath III a écrit : Thanks, I knew about the behavior of the break and was more curious if there was a preferred method or 'correct' method. I assume then that you would definitely use the break. And yeah four chars to eleven is a point to consid

Re: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III
Hi Len, Multiple exit points seems like a good point for clarity unless maybe the switch is very very long then you would know if one was found it would be the absolute end of the script instead of the possibility of it finding another match as well later on in the script. However, with t

Re: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III
Hey Eric, Thanks, I knew about the behavior of the break and was more curious if there was a preferred method or 'correct' method. I assume then that you would definitely use the break. And yeah four chars to eleven is a point to consider. I was thinking that break was important because o

Re: Exit Switch or break switch question

2008-03-20 Thread len-morgan
I've always used the second example you had. Sometimes it can get a little harder to debug (and less clear for someone else reading your code) if you have multiple exit points. In the end, I think they both accomplish the same thing. len morgan > If I want to leave a switch statement after succ

Re: Exit Switch or break switch question

2008-03-20 Thread Eric Chatonet
Hi Tom, Break skips the rest of the current switch structure and goes to the statement following the end switch. Only four chars to write ;-) Le 20 mars 08 à 16:06, Thomas McGrath III a écrit : on menuPick pChosen switch pChosen case "Home" -- code goes here

Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III
If I want to leave a switch statement after successfully matching a case is it better to break and rund to the end without a default statement or to exit the switch from that case? ComboBox on menuPick pChosen switch pChosen case "Home" -- code goes here e