[Gambas-user] What are the {} enclosed variables

Benoît Minisini gambas at ...1...
Fri Mar 5 09:23:19 CET 2010


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

-- 
Benoît Minisini




More information about the User mailing list