prolog_load_context/2

Synopsis

prolog_load_context(+Key, -Value)

prolog_load_context(*Key, *Value)

Finds out the context of the current load.

Arguments


Key atom

Value atom

Description

You can call prolog_load_context/2 from an embedded command or by term_expansion/2 to find out the context of the current load. If called outside the context of a load, it simply fails.


Key
Value
module
the module you are compiling into
file
absolute filename of the file being compiled
stream
the stream you are compiling from
directory
directory of the file on which the stream is open
term_position
a stream position object referring to the position of the clause just read

Backtracking

This predicate is meant to be used in the mode (+, -), but it is also possible to backtrack through it.

See Also

load_files/[1,2] ref-lps