A.35 library(readutil): Reading lines, streams and files
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(readutil): Reading lines, streams and files
          • read_line_to_codes/2
          • read_line_to_codes/3
          • read_stream_to_codes/2
          • read_stream_to_codes/3
          • read_file_to_codes/3
          • read_file_to_terms/3
    • Packages
Availability::- use_module(library(readutil)).(can be autoloaded)
Sourceread_line_to_codes(+Stream, -Codes)
Read the next line of input from Stream and unify the result with Codes after the line has been read. A line is ended by a newline character or end-of-file. Unlike read_line_to_codes/3, this predicate removes a trailing newline character.

On end-of-file the atom end_of_file is returned. See also at_end_of_stream/[0,1].