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.


constant fn = open(command_line()[2],"r")
integer lno = 1
object line
while 1 do
    line = gets(fn)
    if atom(line) then exit end if
    printf(1,"%2d: %s",{lno,line})
    lno += 1
end while
close(fn)
{} = wait_key()
