On Mon, 05 Oct 2015, Moviga Technologies wrote:
>
> Ah, yes - it slipped my mind that inline arrays instantiates a new
> object.
> My example should rather have been:
>
> Dim aCarBrands As New String[5]
>
> With aCardBrands
>.Add("Volvo")
>.Add("Saab")
>.Add("Fiat")
>.Add("Aston
Ah, yes - it slipped my mind that inline arrays instantiates a new
object.
My example should rather have been:
Dim aCarBrands As New String[5]
With aCardBrands
.Add("Volvo")
.Add("Saab")
.Add("Fiat")
.Add("Aston Martin")
.Add("Skoda")
.Add("VW")
.Add("Audi")
End With
So, t
On Mon, 05 Oct 2015, Moviga Technologies wrote:
> 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", "
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", "A
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("V