git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1357 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
		
			
				
	
	
		
			61 lines
		
	
	
		
			935 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			935 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
=================================================================
 | 
						|
Logtalk - Object oriented extension to Prolog
 | 
						|
Release 2.25.1
 | 
						|
 | 
						|
Copyright (c) 1998-2005 Paulo Moura.  All Rights Reserved.
 | 
						|
=================================================================
 | 
						|
 | 
						|
 | 
						|
% start by loading the necessary library support files (if not 
 | 
						|
% already loaded):
 | 
						|
 | 
						|
| ?- logtalk_load(library(types_loader)).
 | 
						|
...
 | 
						|
 | 
						|
 | 
						|
% now you are ready for loading the example:
 | 
						|
 | 
						|
| ?- logtalk_load(msglog(loader)).
 | 
						|
...
 | 
						|
 | 
						|
 | 
						|
% 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
 | 
						|
 |