[Gambas-user] 'Public Enum' Question

Lord Quo lord.quo at ...626...
Tue Aug 24 17:58:13 CEST 2010


    Ok, ok, I discovered the answer. I need to put my variable between braces:

Public Enum Automatic, {Left}, Center, {Right}, Fill, Justify, CenterAcrossSelection, Distributed, JustifyDistributed

   Thanks a lot.



From: Lord Quo 
Sent: Tuesday, August 24, 2010 10:42 AM
To: Gambas-user at lists.sourceforge.net 
Subject: Re: 'Public Enum' Question


   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.


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


More information about the User mailing list