Logtalk 2.26.2 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1486 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura
2005-12-24 18:00:21 +00:00
parent f5002fa37f
commit 9f1b358c04
382 changed files with 8056 additions and 8866 deletions

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.25.1
Release 2.26.2
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.25.1
Release 2.26.2
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
=================================================================
@@ -19,7 +19,7 @@ Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Syntax error: Operator expected
% you must use instead:
% you must use instead functor notation:
| ?- double::double(I, J).
@@ -49,3 +49,7 @@ I = 3
J = 9
Yes
% check the file "previous.txt" generated from the file "next.txt" by the object "reverse"
% by opening the files on a text editor

View File

@@ -10,7 +10,7 @@
:- public(double/2).
:- op(500, xfx, double).
:- op(500, xfx, double). % local object operators, not visible outside this object
1 double 2.

View File

@@ -4,3 +4,12 @@
double,
triple,
reverse])).
/*
If you intend to use the FOP XSL:FO processor for generating PDF documenting
files, comment the directive above and uncomment the directive below
:- initialization(
logtalk_load(
[double, triple, reverse], [xmlsref(standalone)])).
*/

View File

@@ -8,7 +8,7 @@
date is 2004/2/16,
comment is 'Reads and writes a simple table of facts from and to files for testing operator handling code.']).
:- op(500, xfx, next).
:- op(500, xfx, next). % local object operators, not visible outside this object
:- op(500, xfx, previous).
:- initialization(reverse_file).
@@ -17,7 +17,7 @@
reverse_file :-
open('next.txt', read, RStream),
open('previous.txt', write, WStream),
read(RStream, Term),
read(RStream, Term), % local operators are used when reading terms ...
process(Term, RStream, WStream).
process(end_of_file, RStream, WStream) :-
@@ -25,7 +25,8 @@
close(WStream).
process(X next Y, RStream, WStream) :-
write(WStream, Y previous X), write(WStream, '.'), nl(WStream),
write(WStream, Y previous X), % ... and when writing terms
write(WStream, '.'), nl(WStream),
read(RStream, Next),
process(Next, RStream, WStream).