Derek
> How to check now many lines in the files.
> each data width is 4 Char. long.
Get the filesize and divide by 6
(your 4 character data with CRLF (CHR(13)+CHR(10), Carriage
return/Linefeed) at the end of each line.
Depending on how the file was created there maybe a Ctl+Z (CHR(26)) (EOF
indicator) at the end of the file
> How to move the pointer to next line ?
Something like below should give you an idea (untested code - I just typed
it into this message).
aData := {}
cBuffer := space(256)
nHandle := FOpen( 'text.txt', FO_READONLY )
FReadLine( nHandle @[EMAIL PROTECTED]
255 )
cData := trim( cBuffer )
do while ! Empty( cBuffer )
aadd( aData, cData )
FReadLine( nHandle @[EMAIL PROTECTED]
255 )
cData := trim( cBuffer )
if cData = CHR(26) .OR. Empty(cData)
exit
endif
endif
FClose( nHandle )
I'll leave the error checking to you<g>.
Search on the OASIS for FBrowse, it'll show you how to browse a text file
(open/read/move thru), there are plenty of
code samples on the OASIS that will also help you (the source for CLICK!
for example).
NANfor.lib, GrumpFish.Lib, SuperLib, etc...
--
CYA
Steve


|