• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.3 Loading Prolog source files
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Loading Prolog source files
          • load_files/1
          • load_files/2
          • consult/1
          • ensure_loaded/1
          • include/1
          • require/1
          • encoding/1
          • make/0
          • library_directory/1
          • file_search_path/2
          • expand_file_search_path/2
          • prolog_file_type/2
          • source_file/1
          • source_file/2
          • source_file_property/2
          • exists_source/1
          • exists_source/2
          • unload_file/1
          • prolog_load_context/2
          • source_location/2
          • at_halt/1
          • cancel_halt/1
          • initialization/1
          • initialization/2
          • initialize/0
          • compiling/0
          • Conditional compilation and program transformation
          • Reloading files, active code and threads
          • Quick load files
    • Packages
Availability:built-in
Sourceconsult(:File)
Read File as a Prolog source file. Calls to consult/1 may be abbreviated by just typing a number of filenames in a list. Examples:

?- consult(load). % consult load or load.pl
?- [library(lists)]. % load library lists
?- [user]. % Type program on the terminal

The predicate consult/1 is equivalent to load_files(File, []), except for handling the special file user, which reads clauses from the terminal. See also the stream(Input) option of load_files/2. Abbreviation using ?- [file1,file2]. does not work for the empty list ([]). This facility is implemented by defining the list as a predicate. Applications may only rely on using the list abbreviation at the Prolog toplevel and in directives.

ClioPatria (version V3.1.1-51-ga0b30a5)