array functions with type

BlitzMax Forums/BlitzMax Programming/array functions with type

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Type t
	Field a:Int
	Field b:Int
	
End Type

Function func:t[]()
	Local test:t[]=New t[2]
	test[0] = New t
	test[1] = New t
	test[0].a=1
	Return test
End Function

Local x:t[]=func()
With types
New t[2] just creates a two pointer array "test", it doesnt actualy create the two types test[0] or test[1]