[Gambas-user] Embedded arrays
Tobias Boege
taboege at ...626...
Mon Oct 5 21:57:13 CEST 2015
On Mon, 05 Oct 2015, Moviga Technologies wrote:
> 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?
>
The question was clear, I just didn't know what to say. I do not remember
a single time I have used embedded arrays (and it's very likely that since
the time I kinda know what I'm doing in Gambas, I have, in fact, not used
them at all).
>From what I read in the above quoted paragraph, I guess they can be used
in Structs if you want to mirror a C structure to communicate with an
external library. This is something nobody wants to do anyway.
[ But note that I feel like I'm on thin ice regarding embedded arrays.
Maybe Benoit or Fabien know better. ]
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list