OZONE Asylum
Forums
DHTML/Javascript
complex switch case
This page's ID:
27696
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
If you need multiple conditions, I suggest keeping the cases together. [code]switch(var) { case 1: case 2: do1and2(); break; case 3: do3(); break; }[/code] otherwise you'll never see this when it's a couple hundred lines somebody left between the case and the break... And I've been bitten by this quite hard. It took C# to finally get it right (compiler simple requires a break, I believe, except in the case 1: case 2: case.) So long, ->Tyberius Prime
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »