[Gambas-user] Fixed arrays still dynamic

Benoît Minisini gambas at ...1...
Mon Oct 5 23:18:38 CEST 2015


Le 05/10/2015 23:07, Moviga Technologies a écrit :
> I thought when one declares a fixed array, one should not be able to add
> new elements to it?
> But, this works:
>
> ' Gambas module file
>
> Public Sub Main()
>
> Dim sCarBrands As New String[5]
>
>     sCarBrands = ["Volvo", "Saab", "Fiat", "Aston Martin", "Skoda"]
>     sCarBrands.Add("Audi")
>     sCarBrands.Add("VW")
>     Print sCarBrands.Join(", ")
>
> End
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

It is in your head only that those arrays are "fixed". Where did you see 
that written?

-- 
Benoît Minisini




More information about the User mailing list