Hi,

How can I make an array public in a udf?
For example:

code:

;Kixtart.kix
call myfunctions.udf
CreateArray()
UseArray()
;End Kixtart

;myfunctions.udf
Function CreateArray()
Dim $arrGroups[0]
$Index = 0
DO
$Group = ENUMGROUP($Index)
REDIM PRESERVE $arrGroups[$Index]
$arrGroups[$I]=$Group
$Index=$Index+1
UNTIL Len($Group) = 0
;? Ubound($arrGroups)
EndFunction

Function UseArray()
;? Ubound($arrGroups)
For Each $Group In $arrGroups
? "GROUP $Group"
Next
EndFunction


When I enable the Ubound It gives the right number of groups in CreateArray, but it gives 0 in the UseArray.
How can I get this to work?

John