Read a file one line at a time,
as opposed to reading the entire file at once.



Related tasks

 Read a file character by character
 Input loop.


fp = xtra("fileIO").new()
fp.openFile(_movie.path & "input.txt", 1)
fileSize = fp.getLength()
repeat while TRUE
  str = fp.readLine()
  if str.char[1] = numtochar(10) then delete char 1 of str
  if the last char of str = numtochar(13) then delete the last char of str
  put str
  if fp.getPosition()>=fileSize then exit repeat
end repeat
fp.closeFile()