[Gambas-user] Embedded arrays are forbidden here (Within a Function)

Fabien Bodard gambas.fr at gmail.com
Wed Nov 28 19:53:52 CET 2018


Embedded arrays were created to ease the interface between Gambas and
external functions located in shared libraries.

Consequently, I strongly suggest to use them only if you cannot use normal
arrays.

Or if your code run faster with embedded arrays than with normal arrays, as
it's possible in some cases.

In Gambas 3, embedded arrays cannot be used as local variables anymore. But
they can be public!

http://gambaswiki.org/wiki/lang/arraydecl


Le mer. 28 nov. 2018 à 19:50, Fabien Bodard <gambas.fr at gmail.com> a écrit :

> You need to use Dynamic array in a function :
>
> Dim aWeight as new Integer[12]
>
> Le mer. 28 nov. 2018 à 19:03, KKing <kicking177 at gmail.com> a écrit :
>
>> within a function if I use
>>
>>      Dim intWeight[12] As Integer
>>
>> when I go to compile I get.
>>
>>      Embedded arrays are forbidden here.
>>
>> Why?
>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>
>
> --
> Fabien Bodard
>


-- 
Fabien Bodard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181128/d35c9217/attachment.html>


More information about the User mailing list