Simple array help needed..

BlitzMax Forums/BlitzMax Beginners Area/Simple array help needed..

Heres some code for ya =) (showing dynamic arrays and array passing to functions)


Local firstnames:String[] = [ "bob", "jon" ]
Local lastnames:String[] = [ "conner", "walker" ]

Function RandomName:String( a:String[], b:String[])
	Return a[ Rand( 0, a.Length - 1)] + " " + b[ Rand( 0, b.Length - 1)]
EndFunction


Print RandomName( firstnames, lastnames)


EDIT: sorry about the bug in the code...