[Gambas-user] 'Public Enum' Question

François Gallo gb.france1159 at ...626...
Tue Aug 24 17:49:03 CEST 2010


Le mardi 24 août 2010 à 10:42 -0500, Lord Quo a écrit :
> Sorry, I wrote a terrible begginer error.
> 
>    This is my "correct" code:
> 
> Public Enum Automatic, Left, Center, Right, Fill, Justify, CenterAcrossSelection, Distributed, JustifyDistributed
> 
>    But Left and Right give me problems because they are reserved word. Can I use them in another form? In VB.NET I remember that the solution is use [Left] and [Right]
> 
>    Thanks.
> 

Yes you can by enclosing your variable name within { } .

François.

> 
> From: Lord Quo 
> Sent: Monday, August 23, 2010 7:17 PM
> To: Gambas-user at lists.sourceforge.net 
> Subject: 'Public Enum' Question
> 
> 
> Hi all, I have a Public Enum declaration, but I need (or want) to use a constants named Left and Right:
> 
> Public Enum StyleHorizontalAlignment Automatic, Left, Center, Right, Fill, Justify, CenterAcrossSelection, Distributed, JustifyDistributed
> 
> But when I compile the project, Gambas give me an error:
> 
> 'Automatic' unexpected
> In class StyleEnums.module line 2
> 
> Can anyone help me?
> 
> Thanks
> 
> Daniel Rojas
> ------------------------------------------------------------------------------
> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
> Be part of this innovative community and reach millions of netbook users 
> worldwide. Take advantage of special opportunities to increase revenue and 
> speed time-to-market. Join now, and jumpstart your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> 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