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 » Tue Jan 17, 2012 2:04 pm

Hello

Is it possible in (future) version of Rhino, to get javascript syntax like:
Code: Select all
   switch (sDestType) {   

   case "foo":
            ... stuff
                break;
                  
   case "this", "that":
           ... other stuff
           break;                  
   }

Say, now I don't know how to make case "multi" working...

Reards, Jan
JvNoort
 
Posts: 42
Joined: Wed Jul 27, 2011 11:43 am
Location: Leiden, the Netherlands

Re: switch syntax flexibility

Postby ROCLASI » Tue Jan 17, 2012 3:03 pm

Hi Jan,

You can use the following syntax:
Code: Select all
   switch (sDestType) {   

   case "foo":
            ... stuff
                break;
                 
   case "this":
   case "that":
           ... other stuff
           break;                 
   }


( Now you know what the break is for ;) )

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests