1591: Fleread: line to long

Started by juergenk, June 02, 2022, 06:46:06 AM

Previous topic - Next topic

juergenk

Hello guys,

i will read an very long line in Files how i can do this ?

greetings
juergen

filename = "E:\a\Projekt GL NEU\FB\bed.htm"
arrFile = ArrayFileGet (filename , "" , 0)
linecount = ArrInfo(arrFile,6)
For x = 0 to linecount-1
  line =  arrFile

  •   Pause("Line: ":x, line)
    Next

td

The solution depends on what exactly the "this" is you are trying to perform. If you are referring to parsing out the contents of a file, WinBatch offers several ways of performing that task including loading the file into a binary buffer. If you are referring to displaying the contents of a portion of a file, WinBatch offers several ways of performing that task too. For example, you could consider creating a WIL dialog.

Also, you can control the maximum file line length with IntControl 65. Check it out in the Consolidated WIL Help file on your system or by going to the WinBatch Documentation Website.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor


stanl

Maybe off topic. But why read an .htm file line by line. There are parsers and components that might produce results [not specified in original post]... conducive to a goal.

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

At the risk of speaking the obvious, IntControl 65 documentation only mentions the FileRead function but the same setting is used by ArrayFileGet. A new IntControl 65 setting only takes effect for files opened with FileOpen or ArrayFileGet after the call to IntControl 65.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade