Program name: Difference between revisions
Content added Content deleted
Line 1,304: | Line 1,304: | ||
=={{header|Prolog}}== |
=={{header|Prolog}}== |
||
<lang Prolog> |
<lang Prolog> |
||
% SWI-Prolog version 7.6.4 for i386 |
% SWI-Prolog version 7.6.4 for i386. |
||
% This will find itself, and return the file it is in. |
% This will find itself, and return the file it is in. |
||
file_name(F) :- true |
file_name(F) :- true |
||
, M = user % M is the module. |
, M = user % M is the module . |
||
, P = file_name(_) % P is the predicate. |
, P = file_name(_) % P is the predicate. |
||
, source_file(M:P, F) % F is the filename. |
, source_file(M:P, F) % F is the filename . |
||
, \+ predicate_property(M:P, imported_from(_)) |
, \+ predicate_property(M:P, imported_from(_)) |
||
. |
. |