switch syntax flexibility

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

switch syntax flexibility

Postby JvNoort » Thu Sep 22, 2011 2:07 pm

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:

Code: Select all
switch (mycase) {

      case "red", "yellow": Do this
      case "green" : Do that

switch syntax didn't recofnize that. (Am i right ? :idea: )
So, is it not a good idea to add syntax possibilities like case <50, >= 100:
Posts: 42
Joined: Wed Jul 27, 2011 11:43 am
Location: Leiden, the Netherlands

Re: switch syntax flexibility

Postby kwpsd » Thu Sep 22, 2011 7:41 pm

Try this:

Code: Select all
switch (mycase) {

      case "red":
      case "yellow":
            Do this
      case "green" :
            Do that;
Kim W. Premuda
San Diego, CA USA
User avatar
Posts: 639
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA

Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest