The easiest way is to use types. The following code creates a new aline (which is a blitz type defined to contain a single string) for each line of the file it reads. Once the lines have been read into memory using blitz types, it is very easy to loop through the document using the For Each method:
Type aline
Field astring$
End Type
filein=ReadFile("c:\testing.html")
While Not Eof(filein)
a.aline=New aline
a\astring=ReadLine(filein)
Wend
CloseFile(filein)
For a.aline=Each aline
Print a\aline
Next
|