If the compiler encounters a variable with the name __HOST__ in the source then it replaces that variable with the hostname of the computer being compiled at that moment. This can be useful for debugging Prolog programs as __HOST__ can be used by debug predicates that write and/or log messages of a Prolog application.
see also: __FILE__ __LINE__ __MODULE__
| Examples | |
| start( __HOST__ ). | If the predicate start/1 is located on a computer with the
hostname 'koala' and the goal 'start(X).' is proven then the variable X be unified with
the name of the host. X = 'koala' |