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.


let f = fopen("foo.txt", "r");
if f != nil {
    var line;
    while (line = fgetline(f)) != nil {
        print(line);
    }
 
    fclose(f);
}