Call the Prolog predicate pred in the module module
using the Tcl syntax for the arguments.
If module is omitted, eclipse
is assumed.
Pred is a list whose first element is the Prolog predicate
name and subsequent elements are its arguments.
The arguments are converted to Prolog data as follows:
- Simple non-numeric strings are converted to Prolog strings
(not atoms!).
- Strings which represent valid numeric values are converted
to Prolog numbers,
floats have precision corresponding to the current value
of the float_precision flag.
- Strings which start with an uppercase character or with
an underscore are converted to Prolog variables,
provided they do not appear inside a list.
- Tcl lists are converted to Prolog lists.
- "" as an empty list is converted to an empty string.
- {} as an empty list is converted to the string "{}".
The return value of the prolog command
is a string, one of success, fail
or error.
If the predicate call was successful and if it contained
Prolog variables, the answer bindings of the variables
can be retrieved from the global Tcl array var,
indexed by the variable name.
Variables which are free when the command returns
are not present in the var array.