[Gambas-user] Embedded arrays

Benoît Minisini gambas at ...1...
Mon Oct 5 22:00:23 CEST 2015


Le 05/10/2015 21:44, Moviga Technologies a écrit :
> If my question remains unanswered because it was not clear, this is what
> I meant:
>
> When do you want to use:
> Dim sText[] As String
>
> instead of:
> Dim sText As String[]
>
> According to the wiki it seems they can only be used with native data
> types? Is that why the book 'Beginners Guide to Gambas' calls them
> 'native arrays'?
>
> I have also read this, but it is not entirely clear to me what it means:
>
> "An embedded array is an array that is allocated directly inside the
> object where it is declared. Such an array cannot be shared, and is
> destroyed with the object."
>
> So my question is, why/where should one choose to use embedded arrays?
>

It's like structures: it's for embedding the data inside an object, 
mainly to talk with a C function that requires that.

Otherwise you should use normal arrays.

-- 
Benoît Minisini




More information about the User mailing list