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
Interesting example. I did not know that we can keep the cases together. My range of number is between 3 and 18. Grouped by two. Though a need a break in every case because they have different action that I don't want to apply to other case. I've think about this too: [code] switch (var) { case < 4: do action; break; case <6: do action2; break; .... //and so on until 18. } [/code] I've think of it before but forgot to try it...I'm doing it right now! ;) What do you think? Patrick
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »