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.


 
#include <hopper.h>
 
main:
   .ctrlc
   fd=0
   fopen(OPEN_READ,"archivo.txt")(fd)
   if file error? 
      {"Error open file: "},file error
   else
      line read=0
      while( not(feof(fd)))
         fread line(1000)(fd), ++line read
         println
      wend
      {"Total read lines : ",line read}
      fclose(fd)
   endif
   println
exit(0)
 