[Gambas-user] Declaring 'Public pbSwitch As Object[16]' throws error 'Syntax error in FMain.class:3'

Doug Hutcheson owlbrudder at ...626...
Wed Aug 16 01:33:27 CEST 2017


Thanks for the explanation, Tobias. Having fixed the declaration, I am
able to run the code, but all I see is an empty form with no controls.
Sigh. I will keep hacking until I understand enough to make it work.

Gambas is great work, by the way - just what I needed.

Cheers,
Doug

On Tue, 2017-08-15 at 13:03 +0200, Tobias Boege wrote:
> 

> I don't know if "Public a As x[k]" was ever valid in Gambas (the source code
> in the markdown of that page looks like Gambas2). See the Array Declaration
> page [1]. You have normally two types of arrays in Gambas. The normal dynamic
> ones, which you can declare with
> 
>   Public a As New x[k]
>   Public a As New x[](k) ' alternative
> 
> (note the NEW keyword), and so-called embedded arrays:
> 
>   Public a[k] As x
> 
> Usually you want the former (normal) arrays.
> 
> I updated the example in the Object.Attach() documentation.
> 
> Regards,
> Tobi
> 
> [1] http://gambaswiki.org/wiki/lang/arraydecl
> 



More information about the User mailing list