Node:3.9 Message and Query System, Next:, Up:3.9 Changes



Message and Query System

Every message issued by the Prolog system is displayed using the built-in predicate print_message/2. Similarly, all user input is handled by the new built-in predicate ask_query/4. The behavior of these predicates can be customized by a number of new hooks. For example, all I/O can be redirected from the standard streams to Tcl/Tk or similar windows. The default appearance of system messages has also changed.

The mapping from Prolog terms representing messages to printed messages is now completely transparent and customizable. The new library('SU_messages') file defines the mapping rules. Runtime systems can display system messages in standard format by loading this file.

A number of new hooks have been added for the message and query system: generate_message_hook/3, generate_message/3, message_hook/3, print_message_lines/3, query_hook/6, query_class_hook/5, query_input_hook/3, query_map_hook/4.

See Messages and Queries.