[Gambas-user] Way to create dynamic Arrays

Jussi Lahtinen jussi.lahtinen at gmail.com
Tue Aug 15 22:03:43 CEST 2023


Next time it is better to attach a small project to illustrate your
problem. Many times (like this one) the problem is not in the given code.
However, you should not use "Samples" as variable name twice, once for
public and once for the local.

Jussi

On Tue, Aug 15, 2023 at 10:47 PM Hartmut Wagener <
hartmut.w.wagener at t-online.de> wrote:

> I have tried the dynamic arrays.
>
> I created an array
>
>
> Public Samples as Short[]
>
>
> Inside the program i used
>
>
> Dim Samples As New Short[countSamples]
>
>
> to add an array-entry.
>
>
> countSamples is incremented each new Sample.
>
>
> The program runs through the readin-phase, but there is no array created
> with all the samples.
>
>
> What is wrong?
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230815/4fae36f6/attachment.htm>


More information about the User mailing list