Am Freitag, den 05.03.2010, 10:01 +0100 schrieb Rolf-Werner Eilert: > Am 05.03.2010 09:23, schrieb Benoît Minisini: > >> Hi > >> > >> The ghostwriters have been a bit ephemeral. > >> > >> How about a simple: > >> > >> To use a property name that is also a Gambas reserved name in your personal > >> class, you must enclose the property name within {}. > >> > >> For example: > >> Property Font as Font > >> Property Left as Integer > >> > >> will both cause a compile error. > >> > >> Property {Font} as Font > >> Property {Left} as Integer > >> > >> will not. > >> > >> rgds > > > > { ... } is a syntax that prevents the compiler from interpreting a symbol > > as a > > reserverd keyword. It allows to use any symbol as an identifier. > > > > This syntax comes from Visual Basic. > > > > Regards, > > > > I find Charles' approach more straight-forward, it points to the > solution, not the problem. This is exactly what the less gifted > programmers like me would look for ;-) But the explanation for VB isn't > bad, either. Maybe we could mention this too: > > --- > To use a property name that is also a Gambas reserved name in your > personal class, you must enclose the property name within {}. > > [then the examples] > > Thus the compiler is kept from interpreting a symbol as a reserved > keyword which allows you to use any desired symbol as an identifier. > --- > > And it changes the original text so we do not produce copyright problems... > > Rolf
Salut, as I saw there are two places to set it : first: Variable Declaration http://gambasdoc.org/help/lang/vardecl second: Local Variable Declaration http://gambasdoc.org/help/lang/localdecl If there is(are) a better place(s) let me know, I will do it this weekend. At the end of the two mentioned pages I will add the following text. Special in Declaration: To use a property name that is also a Gambas reserved name in your personal class, you must enclose the property name within {}. For example: will both cause a compile error.|will not. --------------------------------+------------------------------------- Property Font as Font | Property {Font} as Font Property Left as Integer | Property {Left} as Integer Thus the compiler is kept from interpreting a symbol as a reserved keyword which allows you to use any desired symbol as an identifier. -- Cordialement Charlie ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user