This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/examples/msglog/SCRIPT

47 lines
715 B
Plaintext
Raw Normal View History

=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.5
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
% assume that all library entities have been loaded...
% start recording user messages:
| ?- msglog::record.
yes
% send some messages:
| ?- list::member(X, [1, 2, 3]).
X = 1 ;
X = 2 ;
X = 3 ;
no
| ?- character::is_alpha(p).
yes
| ?- integer::between(1, 4, N).
N = 1 ;
N = 2 ;
N = 3 ;
N = 4 ;
no
% stop recording and print message log:
| ?- msglog::(stop, print).
list::member(X, [1, 2, 3]).
character::is_alpha(p).
integer::between(1, 4, N).
yes