End of file

dude2443
06-02-2003, 08:54 AM
heres my code

'open file
Open "m:movies.dat" For Random Access Read As #1 Len = 1000

For x = 1 To 100
Get #1, , movies(x, 1)
Get #1, , movies(x, 2)
Get #1, , movies(x, 3)
Get #1, , movies(x, 4)
Get #1, , movies(x, 5)
Next x

'close file
Close #1

how can i make EOF work? thanks

SenorPr0n
06-02-2003, 09:47 AM
try putting a " IF EOF(1) THEN GOTO wherever " before the Next x

loquin
06-02-2003, 11:24 AM
Actually,

If EOF(#1) then Exit For

SenorPr0n
06-03-2003, 06:13 AM
Oh, sorry, I forgot about the Exit loop commands. They're so useful but I always forget!

MikeJ
06-03-2003, 06:38 AM
And to add to loquin's code, you don't need the #.
If EOF(1) Then Exit For

Hope this helps,
~MikeJ

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum