Templates
Description
consult(Files) compiles and loads into memory each file of the list Files. Each file is compiled for byte-code using the GNU Prolog compiler (section 4.4) then loaded using load/1 (section 8.23.2). It is possible to specify user as a file name to directly enter the program from the terminal. Files can be also a single file name (i.e. an atom). Refer to the section concerning the consult of a Prolog program for more information (section 4.2.3).
The final file name of a file is computed using the predicates prolog_file_name/2 (section 8.26.4) and absolute_file_name/2 (section 8.26.1).
[ File | Files ], i.e. ’.’(File, Files) is equivalent to consult([ File | Files ]).
Since version 1.4.0, with the introduction of shebang support, consult/1 ignores the first line of a Prolog source file which directly begins with #. See (section 4.2.4) for more information about shebang support and PrologScript.
Errors
Portability
GNU Prolog predicates.
Templates
Description
load(Files) loads into memory each file of the list Files. Each file must have been previously compiled for byte-code using the GNU Prolog compiler (section 4.4). Files can be also a single file name (i.e. an atom).
The final file name of a file is computed using the predicates absolute_file_name/2 (section 8.26.1). If no suffix is given ’.wbc’ is appended to the file name.
Errors
Portability
GNU Prolog predicate.
Templates
Description
listing(Pred) lists the clauses of the consulted predicate whose predicate indicator is Pred. Pred can also be a single atom in which case all predicates whose name is Pred are listed (of any arity). This predicate uses portray_clause/2 (section 8.14.8) to output the clauses.
listing lists all clauses of all consulted predicates.
Errors
Portability
GNU Prolog predicate.