[Gambas-user] Gambas example question

johnf jfabiani at ...1109...
Sat Dec 3 19:52:07 CET 2005


On Saturday 03 December 2005 07:29, Fabricio Santos wrote:
> Viva Andy,
>
> I was looking at this example in the Gambas help browser and I have a
> question about it:
>
> ==================================
> I suggest the following code.
>
> PRIVATE $hConn AS Connection
>
> PUBLIC SUB GoConnect()
>   DIM sName AS String
>   TRY $hConn.Close
>     sName = "fgda"
> ...
> ==================================
>
> Is there a special reason for the variable name to include a $ sign? Or
> is it just part of Gambas to accept a $ sign on any variable name and
> you decided to use it there?
>
> I have browsed the docs extensively and couldn't find an answer to this
> question nor did I find general information on building identifier
> names, which characters are allowed and the sort.
>
> Although 12 years ago I wrote a compiler from scratch and am quite
> familiar with the theory of building compilers I am not in a good enough
> shape anymore to dive into the Gambas code and grammar to find all this
> out so any help will be welcome.
>
> Thanks,
>
> -fs
Not really sure but I think the "$" make the variable private within a class.

John




More information about the User mailing list