Try this:
Code:
Break on
Global $KatArray[0]

Function BuildArray()

Dim $F01Handle
Dim $F01RC
Dim $F01Line
Dim $F01Index
Dim $ReadError

$F01Handle = FreeFileHandle ()

$F01RC = Open($F01Handle, "c:\data\scripts\junk.kix",2)
$F01Line = ReadLine($F01Handle)
$ReadError = @ERROR

$F01Index = 0
$KatArray[$F01Index] = $F01Line

While Not $ReadError

? $KatArray[$F01Index]
$F01Line = ReadLine($F01Handle)
$ReadError = @ERROR
if Not $ReadError
$F01Index = $F01Index + 1
ReDim Preserve $KatArray[Ubound($KatArray) +1]
$KatArray[$F01Index] = $F01Line
endif
Loop

? "Index Value = " + $F01Index

$F01RC = Close($F01Handle)

EndFunction

BuildArray()

for each $Item in $KatArray
? $Item
next



Edited by Howard Bullock (2005-05-11 02:52 PM)
_________________________
Home page: http://www.kixhelp.com/hb/