functions and arrays

Blitz3D Forums/Blitz3D Beginners Area/functions and arrays

You cannot pass an array to a function, but you can pass a type handle:
; Function to call
Function test( a.kk )
For n = 0 To 99
Print a\arr$[n]
Next
End Function

; Main
Type kk
Field arr$[99]
End Type
k.kk = New kk

;To get a visible result
For n=0 To 99
	k\arr[n]="Field "+n
Next

test( k )
WaitKey