Pass a Blitz array to a function

BlitzMax Forums/BlitzMax Programming/Pass a Blitz array to a function

JoshK(Posted 2006) [#1]
How do I do this?:

local tokens$[2]
tokens[0]="search string 1"
tokens[1]="search string 2"

Function ScanPath(path$,tokens$[])


fredborg(Posted 2006) [#2]
Is this what you mean?
Local tokens$[2]
tokens[0]="search string 1"
tokens[1]="search string 2"

ScanPath("ing 2",tokens)

Function ScanPath(path$,tokens$[]) 
	
	For Local s:String = EachIn tokens
		If s.find(path)=>0
			Print "~q"+s+"~q contains ~q"+path+"~q"
		EndIf
	Next
	
EndFunction



JoshK(Posted 2006) [#3]
Cool, got it.