The Logtalk Handbook Logo
3.37.0

Contents

  • User Manual
  • Reference Manual
    • Grammar
    • Control constructs
    • Directives
    • Built-in predicates
    • Built-in methods
      • Execution context
      • Reflection
      • Database
      • Meta-calls
      • Error handling
      • All solutions
      • Event handling
      • Message forwarding
      • Definite clause grammar rules
      • Term and goal expansion
      • Coinduction hooks
      • Message printing
        • print_message/3
        • message_tokens//2
        • message_hook/4
        • message_prefix_stream/4
        • print_message_tokens/3
        • print_message_token/4
      • Question asking
  • Tutorial
  • FAQ
  • Developer Tools
  • Libraries
  • Glossary
  • Bibliography
  • Index

External Contents

APIs Logtalk website GitHub repo
The Logtalk Handbook
  • Docs »
  • Reference Manual »
  • Built-in methods »
  • Message printing »
  • print_message_tokens/3
  • Edit on GitHub

print_message_tokens/3¶

Description¶

print_message_tokens(Stream, Prefix, Tokens)

Built-in method for printing a list of message tokens, declared in the logtalk built-in object as a public predicate. This method is automatically called by the print_message/3 method (assuming that the message was not intercepted by a message_hook/4 definition) and calls the user-defined hook predicate print_message_token/4 for each token. When a call to this hook predicate succeeds, the print_message_tokens/3 predicate assumes that the token have been printed. When the call fails, the print_message_tokens/3 predicate uses a default printing procedure for the token.

Modes and number of proofs¶

print_message_tokens(@stream_or_alias, +atom, @list(nonvar)) - zero_or_one

Errors¶

(none)

Examples¶

...,
logtalk::print_message_tokens(user_error, '% ', ['Redefining ~w ~q'-[object,foo], nl]),
...

See also

message_hook/4, message_prefix_stream/4, message_tokens//2, print_message/3, print_message_token/4, ask_question/5, question_hook/6, question_prompt_stream/4

Next Previous

© Copyright 1998-2020, Paulo Moura

Built with Sphinx using a theme provided by Read the Docs.