R: [Gambas-user] Select Case Structure

Michael Sullivan michael at ...558...
Wed Aug 18 23:28:00 CEST 2004


Do I not need to BREAK out of the switch when I'm done with it?  I mean
will it not fall through and start executing the next case condition if
I don't use break, like it does in C++ and Java?  Sorry about the
semicolon.  I'm more used to C++ right now...

On Wed, 2004-08-18 at 16:22, Luciano Bastianello wrote:
> The select case sintax is:
> select case <value>
>   case <constant1>, <constant2>
>   case <constant3>
>   case else 
> end select
> 
> "CASE 0:" and ";" are sintax errors
>  
> -----Messaggio originale-----
> Da: gambas-user-admin at lists.sourceforge.net [mailto:gambas-user-admin at ...574...ts.sourceforge.net] Per conto di Michael Sullivan
> Inviato: mercoled�� 18 agosto 2004 23.08
> A: gambas-user at lists.sourceforge.net
> Oggetto: [Gambas-user] Select Case Structure
> 
> Has the Select Case structure been altered in Gambas?  I wrote the
> following switch:
> 
>   SELECT CASE cboAction.Selection
>      CASE 0 
>         'Change Status
>         BREAK
>      CASE 1
>         'Completed
>         BREAK
>      CASE 2:
>         'Move top
>         BREAK
>      CASE 3:
>         'Move up
>         BREAK
>      CASE 4:
>         'Move down
>         BREAK
>      CASE 5:
>         'Move bottom
>         BREAK;
>   END SELECT
> 
> and it keeps giving me "Syntax Error:  End of Line expected." on my Case
> 0: line.  How do I fix this?
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list