Global array in type

BlitzMax Forums/BlitzMax Beginners Area/Global array in type

In case it's confusing you can do this. ;)

Type t
	Global a:Int[]
	Function SizeArray()
		a=a[..10]
	End function
End Type


t.SizeArray()
n:t=New t
n.a[0]=10
Print n.a[0]  ' Result 10
Print SizeOf t.a  ' Result 40 (4*10)


j:t=New t
Print j.a[0]  ' Result 10


t.SizeArray() initiate the array for you.