# switch syntax flexibility

**URL:** <https://forum.servoy.com/t/switch-syntax-flexibility/14719>\
**Category:** Classic Servoy\
**Created:** [September 22, 2011, 12:07pm UTC](https://forum.servoy.com/t/switch-syntax-flexibility/14719 "2011-09-22T12:07:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JvNoort](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@JvNoort](https://forum.servoy.com/u/JvNoort)\
**Post date:** [September 22, 2011, 12:07pm UTC](https://forum.servoy.com/t/switch-syntax-flexibility/14719/1 "2011-09-22T12:07:59Z")

</div>

Hello again,

Can it not be arranged in “Rhino” that a switch statement can handle more args in a case:

I tried to use in a calculation:

```auto
switch (mycase) {

      case "red", "yellow": Do this
      break;
      case "green" : Do that
}

```

switch syntax didn’t recofnize that. (Am i right ? ![:idea:]( "Idea") )  
So, is it not a good idea to add syntax possibilities like case \<50, \>= 100:  
etc…

---

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [September 22, 2011, 5:41pm UTC](https://forum.servoy.com/t/switch-syntax-flexibility/14719/2 "2011-09-22T17:41:59Z")

</div>

Try this:

```auto
switch (mycase) {

      case "red":
      case "yellow":
            Do this
            break;
      case "green" :
            Do that;
            break;
}

```
