Good idea. I will check what I can do. Maybe I have to change native function.
In the meantime a possible way is to load the whole file and parse it into an array of lines using something like the following. If file is up to some MByte it should do the work very very quickly.
[code=thinbasic]
uses "FILE"
'---Change file name as needed
dim MyFile as string value APP_SourceFullName
'---Will contains all lines loaded
Dim MyLines() AS STRING
'---Will count number of lines found
DIM nLines AS LONG
'---Load the full file and parse it into tokens separated by $LF
'---Returns number of tokens (in this case lines) found
'---MyLines array will have all tokens loaded inside
nLines = PARSE(file_load(MyFile), MyLines, $lf)
msgbox 0, "Lines loaded: " & nLines
[/code]
Also (again as possible altyernative) consider FILE_Load and FILE_Save that work on the full file buffer. Than you can handle file content in string buffer.
Ciao
Eros
Bookmarks