
prolog_format.pl -- Analyse format specificationsThis library parses the format specification used by format/1, format/2 and format/3. The parsed specification can be used to validate the consistency of the format string and the provided arguments. For example:
?- format_types('~d bottles of beer', Types).
Types = [integer].
format_spec(+Format, -Spec:list) is det
format_spec(-Spec)// is det
format_types(+Format:text, -Types:list) is det
spec_types(+FormatSpec, -Types:list(type)) is det[private]library(mavis).
is_action(+Action:integer) is semidet[private]
action_types(?Action:integer, ?Types:list(type))[private]~), which consumes no arguments, has Types=[]. For example,
?- action_types(0'~, Types). Types = []. ?- action_types(0'a, Types). Types = [atom].