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.


 
bundle Default {
  class ReadFile {
    function : Main(args : String[]) ~ Nil {
      f := IO.FileReader->New("in.txt");
      if(f->IsOpen()) {
        string := f->ReadString();
        while(f->IsEOF() = false) {
          string->PrintLine();
          string := f->ReadString();
        };
        f->Close();
      };
    }
  }
}
 