[Gambas-user] basics of dynamic arrays of structures
Kevin Fishburne
kevinfishburne at ...1887...
Sat Dec 21 06:36:12 CET 2013
I've gotten some flak about how I declare arrays and want to change my
ways. Previously I would do something like:
Public SomeArray[300,300] as Integer
I have a case now where I need an array whose number of elements will be
incremented and that will be cleared occasionally. Of course I can't
figure out how to do it. My code looks like this (I stripped it down):
---
Public Struct PlanWallStructure
Created As Boolean
End Struct
Public Struct PlanStructure
Wall As Struct PlanWallStructure
End Struct
Public Plan[10] As Struct PlanStructure
---
So I need, for example, Plan[0].Wall to be an array where I can do
something like:
---
Plan[0].Wall.Clear
Index = Plan[0].Wall.Count
Plan[0].Wall[Index] = True
Index = Plan[0].Wall.Count
Plan[0].Wall[Plan[0].Wall.Count] = False
---
Is this possible? I've tried every syntax I can think of and looked at
the documentation but get errors every time.
--
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271
More information about the User
mailing list