Passing and returning arrays

BlitzMax Forums/BlitzMax Programming/Passing and returning arrays

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.

Interestingly the compiler lets you redundantly write var after the array in the function parameters...
Not quite redundant...
Local test[10]

Print test.length

ResizeMe1(test, 20)

Print test.length

ResizeMe2(test, 30)

Print test.length

End

Function ResizeMe1(array[], size)
	array = array[..size]
End Function
	  
Function ResizeMe2(array[] Var, size)
	array = array[..size]
End Function