[Gambas-user] integer array in struct ?

Bruce Bruen bbruen at ...2308...
Tue Oct 25 10:53:18 CEST 2011


On Tue, 2011-10-25 at 08:25 +0200, wally wrote:

> Public Struct axis
>   i As Integer 
>   f  As Float
>   ia As Integer[]
> End Struct 

etc

' Gambas module file

Public Struct axis
  i As Integer 
  f As Float
  ia As Integer[]
End Struct

Public Sub Main()

Dim testit As New Axis
Dim x As Integer

testit.ia = New Integer[]

testit.i = 212
testit.f = Pi()

Print testit.ia.Bounds

testit.ia.Add(1)
testit.ia.Add(2)
For x = 1 To 312654
  testit.ia.Add(x)
Next

End

seems to work.

Bruce



More information about the User mailing list