Next: , Previous: , Up: ref-msg   [Contents][Index]

4.16.3 Query Processing

All user input in the Prolog system is handled by a single predicate:

ask_query(QueryClass, Query, Help, Answer)

QueryClass, described below, specifies the form of the query interaction. Query is an abstract message term specifying the query text, Help is an abstract message term used as a help message in certain cases, and Answer is the (abstract) result of the query.

ask_query/4 is a built-in predicate, so that users can invoke it to have their own queries processed in the same way as the system queries.

The processing of queries is highly customizable. For example, this allows changing the language of the input expected from the user, or to make queries appear in dialog windows rather than on the terminal.

Send feedback on this subject.