[Gambas-user] Question

Tobias Boege taboege at ...626...
Tue Sep 29 18:04:08 CEST 2015


On Tue, 29 Sep 2015, Moviga Technologies wrote:
>  
> 
> Property Read {Map} As Map 
> 
> What are the brackets doing? 

They tell the compiler to treat the bracketed string as an identifier. This
is documented here[0]. Since there apparently is a class named "Map" already,
it might cause trouble for the parser if you call a totally unrelated symbol
also "Map". The brackets clarify the situation, although I think they're not
needed in property declarations.

As [0] indicates, using reserved keywords of the language as identifiers
(as opposed to using already declared identifiers for different symbols) is
another place where brackets must be used.

Regards,
Tobi

[0] http://gambaswiki.org/wiki/lang/resident

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list