Author(s): Daniel Cabeza.
Version: 1.11#222 (2004/5/24, 13:8:7 CEST)
Version of last change: 1.11#72 (2003/12/19, 16:56:14 CET)
This module provides predicates for printing in a unified way informational messages, and also for printing some terms in a specific way.
io_aux
)io_aux
)
message(Type, Message)
Output to standard error Message
, which is of type Type
. The quiet
prolog flag (see section Changing system behaviour and various flags) controls which messages are actually output, depending on its type. Also, for error
, warning
and note
messages, a prefix is output which denotes the severity of the message. Message
is an item or a list of items from this list:
$$(String)
String
is a string, which is output with
display_string/1
.
"(Term)
Term
is output quoted. If the module
write
is loaded, the term is output with
writeq/1
, else with
displayq/1
.
~~(Term)
Term
is output unquoted. If the module
write
is loaded, the term is output with
write/1
, else with
display/1
.
[](Term)
Term
is recursively output as a message, can be an item or a list of items from this list.
Term
display/1
.
Usage: message(Type, Message)
Type
is an atom.
(basic_props:atm/1
)
Type
is an element of [error,warning,note,message,debug]
.
(basic_props:member/2
)
message_lns(Type, L0, L1, Message)
Output to standard error Message
, which is of type Type
, and occurs between lines L0
and L1
. This is the same as
message/2
, but printing the lines where the message occurs in a unified way (this is useful because automatic tools such as the emacs mode know how to parse them).
Usage: message_lns(Type, L0, L1, Message)
Type
is an atom.
(basic_props:atm/1
)
Type
is an element of [error,warning,note,message,debug]
.
(basic_props:member/2
)
Defined as
error(Message) :- message(error,Message).
.
Defined as
warning(Message) :- message(warning,Message).
.
Defined as
note(Message) :- message(note,Message).
.
Defined as
message(Message) :- message(message,Message).
.
Defined as
debug(Message) :- message(debug,Message).
.
inform_user(Message)
Similar to
message/1
, but Message
is output with
display_list/1
. This predicate is obsolete, and may disappear in future versions.
display_string(String)
Output String
as the sequence of characters it represents.
Usage: display_string(String)
String
is a string (a list of character codes).
(basic_props:string/1
)
display_list(List)
Outputs List
. If List
is a list, do
display/1
on each of its elements, else do
display/1
on List
.
display_term(Term)
Output Term
in a way that a
read/1
will be able to read it back, even if operators change.
io_aux
)Go to the first, previous, next, last section, table of contents.