Like this, maybe:
Or:
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