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.


command readFileLineByLine
    local tFile, tLines, startRead
    put "/usr/share/dict/words" into tFile
    open file tFile for text read
    put true into startRead
    repeat until it is empty and startRead is false
        put false into startRead
        read from file tFile for 1 line
        add 1 to tLines
    end repeat
    close file tFile
    put tLines
end readFileLineByLine