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

Martin CRISTIA reported a new bug.

Summary
-------

Auto add elements to a Struct array when resized

Type             : Request
Priority         : High
Gambas version   : Unknown
Product          : Language


Description
-----------

When an array of Structures is created, i.e.:

Public Struct myStructNodes
   iNodes as integer
   sDesc as string
   sComents as string
End Struct

Public Nodes as New myStructNodes[]

then

Nodes.Resize(10) 'just Null positions are added, so this is worthless

this is what is needed 

Dim a as integer, sNode as New MyStructNodes
 
For a = 1 to 10
   sNode = New MyStructNodes
   Nodes.Add(sNode)
   sNode = Null
Next





------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to