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

4.3 Loading Prolog source files
AllApplicationManualNameSummaryHelp

  • 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
          • unload_file/1
          • prolog_load_context/2
          • source_location/2
          • at_halt/1
          • cancel_halt/1
          • initialization/1
          • initialization/2
          • initialization/0
          • compiling/0
          • Conditional compilation and program transformation
          • Reloading files, active code and threads
          • Quick load files
    • Packages
Availability:built-in
Sourceinitialization(:Goal, +When)
Similar to initialization/1, but allows for specifying when Goal is executed while loading the program text:
now
Execute Goal immediately.
after_load
Execute Goal after loading the program text in which the directive appears. This is the same as initialization/1.
restore
Do not execute Goal while loading the program, but only when restoring a saved state.
program
Execute Goal once after executing the -g goals at program startup. Registered goals are executed in the order encountered and a failure or exception causes the Prolog to exit with non-zero exit status. These goals are not executed if the -l is given to merely load files. In that case they may be executed explicitly using initialize/0. See also section 2.10.2.1.
main
When Prolog starts, the last goal registered using initialization(Goal, main) is executed as main goal. If Goal fails or raises an exception, the process terminates with non-zero exit code. If not explicitly specified using the -t the toplevel goal is set to halt/0, causing the process to exit with status 0. An explicitly specified toplevel is executed normally. This implies that -t prolog causes the application to start the normal interactive toplevel after completing Goal. See also the Prolog flag toplevel_goal and section 2.10.2.1.
ClioPatria (version V3.1.1-51-ga0b30a5)