query_hook/6
[hook]:- multifile 'SU_messages':query_hook/6.
'SU_messages':query_hook(
+QueryClass,
+Prompt,
+PromptLines,
+Help,
+HelpLines,
-Answer)
Provides a method of overriding Prolog's default keyboard based input requests.
Determines the allowed values for the atom Answer.
A message term.
The message generated from the Prompt message term.
A message term.
The message generated from the Help message term.
See QueryClass
This provides a way of overriding Prolog's default method of interaction. If this predicate fails, Prolog's default method of interaction is invoked.
The default method first prints out the prompt, then if the response from the user is not one of the allowed values, the help message is printed.
It is useful to compare this predicate to user:message_hook/3
, since
this explains how you might use the Prompt, PromptLines,
Help, HelpLines.
An exception raised by this predicate causes an error message to be printed and then the default method of interation is invoked. In other words, exceptions are treated as failures.