[Gambas-user] [Gambas Bug Tracker] Bug #982: Auto add elements to a Struct array when resized
bugtracker at ...3416...
bugtracker at ...3416...
Thu Aug 25 14:20:06 CEST 2016
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
More information about the User
mailing list