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 ------------------------------------------------------------------------------ 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