A.11 library(csv): Process CSV (Comma-Separated Values) data
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(csv): Process CSV (Comma-Separated Values) data
          • csv_read_file/2
          • csv_read_file/3
          • csv_read_stream/3
          • csv//1
          • csv//2
          • csv_read_file_row/3
          • csv_read_row/3
          • csv_options/2
          • csv_write_file/2
          • csv_write_file/3
          • csv_write_stream/3
    • Packages
Availability::- use_module(library(csv)).(can be autoloaded)
Source[nondet]csv_read_file_row(+File, -Row, +Options)
True when Row is a row in File. First unifies Row with the first row in File. Backtracking yields the second, ... row. This interface is an alternative to csv_read_file/3 that avoids loading all rows in memory. Note that this interface does not guarantee that all rows in File have the same arity.

In addition to the options of csv_read_file/3, this predicate processes the option:

line(-Line)
Line is unified with the 1-based line-number from which Row is read. Note that Line is not the physical line, but rather the logical record number.