Need Read Line Help.

Blitz3D Forums/Blitz3D Beginners Area/Need Read Line Help.

xmlspy(Posted 2003) [#1]
.


xmlspy(Posted 2003) [#2]
.


skidracer(Posted 2003) [#3]
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



xmlspy(Posted 2003) [#4]
.


Shambler(Posted 2003) [#5]
It should be

Print a\astring



xmlspy(Posted 2003) [#6]
.