|
Post by Nicky Peter Hollyoake on Sept 13, 2009 20:54:30 GMT -5
"ReadLine" misses any line with a space. I don't want this, they a work around for this? - Nicky ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' dim file dim &Line() as string, &LineBackup() as string dim FileName as string dim text$ dim i
''''''''''''''''''''''''''''''
input"File name:", FileName
file = OpenFileRead(FileName) i=0
Printr "Reading file ..."
do text$ = ReadLine(file)
if text$ <> "" then &LineBackup = &Line alloc Line, ArrayMax(LineBackup)+1 for i = 0 to ArrayMax(LineBackup) Line(i) = LineBackup(i) next Line(i) = text$ endif loop until EndOfFile(file)
&LineBackup = NULL
|
|
|
Post by shadow008 on Sept 14, 2009 11:20:16 GMT -5
"ReadText" maybe?
|
|
|
Post by Adam on Sept 28, 2009 13:54:06 GMT -5
If your talking about finding a carriage return, this isn't the best example, but you get the idea
dim file dim &Line() as string, &LineBackup() as string dim FileName as string dim text$ dim i
''''''''''''''''''''''''''''''
input"File name:", FileName
file = OpenFileRead(FileName) i=0
Printr "Reading file ..."
do text$ = text$ + chr$(ReadByte(file)) if Right$(text$,1) = Chr$(13) then Printr Text$
Text$ = "" endif loop until EndOfFile(file) Printr Text$
Text$ = "" &LineBackup = NULL
|
|