Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uncorrectly read file
#2
Like this, maybe:

Code:
f = openfile("story.txt")
lin = frln(f)
while typeof(lin)
    pln lin
    lin = frln(f)
wend
free(f)

Or:

Code:
' contains a bunch of helper functions related to files.
include "file.n7"

' returns the lines of a text file as an array.
lines = ReadAllLines("story.txt")
for i = 0 to sizeof(lines) - 1  pln lines[i]

' return all text as a single string.
text = ReadAllText("story.txt")
pln text
Reply


Messages In This Thread
Uncorrectly read file - by 1micha.elok - 03-23-2024, 11:30 AM
RE: Uncorrectly read file - by Marcus - 03-23-2024, 01:46 PM
RE: Uncorrectly read file - by Tomaaz - 03-23-2024, 02:28 PM
RE: Uncorrectly read file - by Marcus - 03-23-2024, 03:40 PM
RE: Uncorrectly read file - by 1micha.elok - 03-24-2024, 09:09 AM
RE: Uncorrectly read file - by Tomaaz - 03-24-2024, 05:28 PM
RE: Uncorrectly read file - by 1micha.elok - 03-24-2024, 11:55 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)