Raised This Month: $ Target: $400
 0% 

switch() & case


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
capndurk
Senior Member
Join Date: Feb 2006
Old 03-25-2006 , 16:47   switch() & case
Reply With Quote #1

I have two questions:

1) Can I switch a string? For example:

Code:
switch(string) {     case "whatever": //code     case "whatever 2": //code }

and

2) Is it possible to combine cases with an & or |? For example:

Code:
case "whatever": // same code as "whatever 2" case "whatever 2": // same code as "whatever" case "whatever" | "whatever 2": // code

Any help is greatly appreciated.
capndurk is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode