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
hi all, I'd like ot know if I can put interval as in ruby or multiple label in a case. I want to give a value to a variable after comparison with conditions. I know I can do it with the If() statement but it seems to me that it would be better to use a switch() statement. [code] //something like => var variable = something; switch (variable) { //interval in ruby case 1 .. 5: do something; break; //multiple label case variable ==2 || variable ==3: do somtehing; break; } [/code] I've tried both of those example with multiple version but it just don't work...or maybe that switch() cannot take more than one label... and that isn't written anywhere... :( cheers again, Patrick
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail