Previous topic  Top   Print this Topic
 

Current module

 

The term @_ is a short cut for the current module.

 

Example

?- ?X = @_.

 

A more useful example is the usage within a rule using a built-in with an module argument.

:- module m1.

 

// define predicate to access rule text for all user rules of this module

@{ruleText} ruleText(?ID,?TXT) :- _ruleByID(@_, ?ID, ?TXT).