query_abbreviation/3 extendable

Synopsis

:- multifile 'QU_messages':query_abbreviation/3.

query_abbreviation(+Tag, -Prompt, -Pairs)

A way to specify one letter abbreviations for responses to queries from the Prolog System.

Arguments


Tag atom
This indicates which query type.
Prompt atom
An atom indicating appropriate abbreviations.
Pairs list of pair
A list of word-abbreviation pairs.

Description

Prolog only asks for keyboard input in a few different ways. These are enumerated in the clauses for query_abbreviation/3 in the module messages(language('QU_messages')). These clauses specify valid abbreviations for a given key word. For example,

     query_abbreviation(yes_or_no,'(y/n)',[yes-"yY",no-"nN"]).
     

a French translator might decide that the letters O and o are reasonable abreviations for oui (yes), and therefore write

     query_abbreviation(yes_or_no,'(o/n)',[yes-"oO",no-"nN"]).
     

For an example of how this is used with query_hook/6, see the reference page for query_hook_example.

See Also:

ref-msg-umf-int, and the reference page for query_hook/6