Did you know ...
Search Documentation:
Predicate source_location/2
HOME
DOWNLOAD
SWI-Prolog
Sources/building
Docker images
Add-ons
Browse GIT
DOCUMENTATION
Manual
Packages
FAQ
Command line
PlDoc
Bluffers
▶
Prolog syntax
PceEmacs
HTML generation
License
Publications
Rev 7 Extensions
TUTORIALS
Beginner
▶
Getting started
Learn Prolog Now!
Simply Logical
Debugger
Development tools
Advanced
▶
Modules
Grammars (DCGs)
clp(fd)
Printing messages
PlDoc
Web applications
▶
Web applications
Let's Encrypt!
Pengines
Semantic web
▶
ClioPatria
RDF namespaces
Graphics
▶
XPCE
GUI options
Machine learning
▶
Probabilistic Logic Programming
External collections
▶
Meta level tutorials
For packagers
▶
Linux packages
COMMUNITY
IRC
Forum & mailing list
Blog
News
Report a bug
Submit a patch
Submit an add-on
Roadmap (on GitHub)
External links
Contributing
Code of Conduct
Contributors
SWI-Prolog items
COMMERCIAL
WIKI
Login
View changes
Sandbox
Wiki help
All tags
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
source_location
(
-File, -Line
)
If the last term has been read from a physical file (i.e., not from the file
user
or a string), unify
File
with an absolute path to the file and
Line
with the line number in the file. New code should use
prolog_load_context/2
.