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_token/4
  • Edit on GitHub

print_message_token/4¶

Description¶

print_message_token(Stream, Prefix, Token, Tokens)

User-defined hook method for printing a message token, declared in the logtalk built-in object as a public, multifile, and dynamic predicate. It allows the user to intercept the printing of a message token. This hook method is automatically called by the print_message_tokens/3 built-in method for each token.

Modes and number of proofs¶

print_message_token(@stream_or_alias, @atom, @nonvar, @list(nonvar)) - zero_or_one

Errors¶

(none)

Examples¶

:- multifile(logtalk::print_message_token/4).
:- dynamic(logtalk::print_message_token/4).

% ignore all flush tokens
logtalk::print_message_token(_Stream, _Prefix, flush, _Tokens).

See also

message_hook/4, message_prefix_stream/4, message_tokens//2, print_message/3, print_message_tokens/3, 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.