Page 1 of 1

Allow multiple Select statement cases with Default

Posted: Thu Nov 27, 2008 9:24 am
by Mistrel
We can do this:

Code: Select all

Select This
	Case a,b,c
	Default
EndSelect
So why can't we do this?

Code: Select all

Select This
	Case a,b,c
	Default,d
EndSelect

Posted: Thu Nov 27, 2008 10:15 am
by kenmo
Unless I'm missing something, those two would perform exactly the same in any situation? What can't you do?

Re: Allow multiple Select statement cases with Default

Posted: Thu Nov 27, 2008 11:46 am
by PB
> So why can't we do this?

Because "Default" means anything left over after all other cases are evaluated.
It would defeat the point of having a "Default" keyword if you could evaluate
other conditions with it.

Re: Allow multiple Select statement cases with Default

Posted: Thu Nov 27, 2008 5:11 pm
by Little John
Mistrel wrote:We can do this:

Code: Select all

Select This
	Case a,b,c
	Default
EndSelect
So why can't we do this?

Code: Select all

Select This
	Case a,b,c
	Default,d
EndSelect
kenmo is right:
In the first example, Default includes all cases apart from a, b, c. That means, Default does include case d. So there is no difference and no advantage in explicitely writing down case d, as in the second example.

Regards, Little John

Posted: Thu Nov 27, 2008 6:11 pm
by Mistrel
I'm not sure what I was thinking when I made this post. :oops:

Posted: Thu Nov 27, 2008 6:21 pm
by Sparkie
Mistrel wrote:I'm not sure what I was thinking when I made this post.
Chalk it up as a brian fart and move on. Happens to me all the time :wink:

Posted: Thu Nov 27, 2008 9:43 pm
by blueznl
Sparkie wrote:
Mistrel wrote:I'm not sure what I was thinking when I made this post.
Chalk it up as a brian fart and move on. Happens to me all the time :wink:
Good thing my name isn't Brian :-)

Posted: Thu Nov 27, 2008 11:06 pm
by Psychophanta
Sparkie wrote:
Mistrel wrote:I'm not sure what I was thinking when I made this post.
Chalk it up as a brian fart and move on. Happens to me all the time :wink:
And also to me :lol:

Blue, you know :) no doubt he wanted to write "brain".

Posted: Fri Nov 28, 2008 12:25 am
by Sparkie
Sparkie wrote:...Happens to me all the time.
See what I mean. :lol:

Posted: Fri Nov 28, 2008 10:40 am
by blueznl
Mistrel wrote:I'm not sure what I was thinking when I made this post.
Sparkie wrote:Chalk it up as a brian fart and move on. Happens to me all the time :wink:
BluezNL wrote:Good thing my name isn't Brian :-)
Psychophanta wrote:Blue, you know :) no doubt he wanted to write "brain".
Yeah, sorry, couldn't resist :oops: I seem to have a somewhat wacko sense of humor :wink:

Posted: Fri Nov 28, 2008 1:54 pm
by Sparkie
Yes, i did mean to type b r a i n. :lol:

[off_topic]

To be honest, it's becoming more and more difficult for me to function as a human lately due to my lack of b r a i n power. My abilities to focus and concentrate are dwindling and it's starting to show. :(

I went to the doctor earlier this week and he's pretty sure I have sleep apnea. I will find out for sure next week. It's been month's since I've had a good nights sleep.... I am SO looking forward to getting my b r a i n back to it's normal state where the brian farts are far and few between. 8)

[/off_topic]