| View previous topic :: View next topic |
| Author |
Message |
domhnull
Joined: 18 Sep 2004 Posts: 4 Location: Lacey, WA
|
Posted: Fri Oct 08, 2004 2:14 pm Post subject: Switch Case statement |
|
|
Any chance to implement a switch/case statement?
Ex.:
Switch (var) {
case 1:
; do something
return
case 2:
; do something else
return
default:
; if no matches do this
return
} |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10465
|
Posted: Fri Oct 08, 2004 6:03 pm Post subject: |
|
|
It's on the list. I've additionally made a note of your example, thanks.
In the meantime, you probably know you can use the more cumbersome "else if" tree to get exactly the same behavior. In this case, the final "else" in the tree corresponds to the "default" item in the switch. |
|
| Back to top |
|
 |
domhnull
Joined: 18 Sep 2004 Posts: 4 Location: Lacey, WA
|
Posted: Fri Oct 08, 2004 11:24 pm Post subject: |
|
|
| Yep, I knew. Just like the switch/case format. Thanks! Fantastic program, BTW |
|
| Back to top |
|
 |
|