Logtalk reference manual
Built-in predicate: logtalk_load_context/2

logtalk_load_context/2

Description

logtalk_load_context(Key, Value)

Provides access to the Logtalk compilation/loading context. The following keys are currently supported: entity_name, entity_prefix, entity_type, file, directory, stream, and term_position. The term_position key is only supported in back-end Prolog compilers that provide the start and end lines of a read term.

Template and modes

logtalk_load_context(?atom, -atom)

Errors

(none)

Examples

| ?- logtalk_load_context(entity_name, Name).

Name = list
yes

| ?- logtalk_load_context(file, File).

File = 'list.lgt'
yes