Program name: Difference between revisions

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