ask_question(Question, Kind, Component, Check, Answer)
Built-in method for asking a question represented by a term, Question, which is converted to the question text using the logtalk::message_tokens(Question, Component) hook predicate. This method is declared in the logtalk built-in object as a public predicate. The default question prompt and the input stream used for each Kind-Component pair can be found using the logtalk::question_prompt_stream(Kind, Component, Prompt, Stream) hook predicate. The Check argument is a closure that is converted into a checking goal by extending it with the user supplied answer. This predicate implements a read-loop that terminates when the checking predicate succeeds.
This predicate starts by calling the logtalk::question_hook(Question, Kind, Component, Check, Answer) hook predicate. If this predicate succeeds, the ask_question/5 predicate assumes that the question have been successfully asked and replied.
ask_question(+nonvar, +nonvar, +nonvar, +callable, -term)
ask_question(*, *, *, 1, *)
(none)..., logtalk::ask_question(enter_context_spy_point(Template), question, debugger, callable, SpyPoint), ...
question_hook/6, question_prompt_stream/4
message_hook/4, message_prefix_stream/4, message_tokens//2, print_message/3, print_message_tokens/3, print_message_token/4