[Gambas-bugtracker] Bug #2248: Setting Breakpoint controls if errors messages are emitted or not

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Fri Jun 11 19:38:01 CEST 2021


http://gambaswiki.org/bugtracker/edit?object=BUG.2248&from=L21haW4-

Comment #2 by Benoît MINISINI:

By looking at your code, I think you may still make some confusion between "embedded" structures, and structures allocated as normal objects.

So I clarify it to be sure that what you meant to do is what you did.

--8<------------------------------------------------------

Public MyBigArray2[200] As Struct Mystruct ' Allocates an embedded array of structures. Size is 200 x structure size.

Public Struct Mystructbig
  optarray[200] As Mystruct ' This is an embeded arrays of -pointers- that points at structures. Size is 200 x pointer size (8 bytes on 64 bits systems).
End Struct

Public Struct MystructbigAlternative
  optarray[200] As Struct Mystruct ' This is an embeded arrays of structures
End Struct


Public Sub Main()

  Dim mySVar As New MyStruct ' This is a pointer to a structure.
  Dim myBigArray As New Mystructbig  ' This is a pointer to a structure.
  Dim x As Integer
  Dim pdata As Pointer

  For x = 0 To 199
    myBigArray.optarray[x] = New Mystruct ' Allocate a new void MyStruct structure, and put a reference on it into the x-th slot of myBigArray.optArray
  Next

  ...

End

--8<------------------------------------------------------




More information about the Bugtracker mailing list