From ad67cd43afcfb003743737656bafac2735c14378 Mon Sep 17 00:00:00 2001 From: pmoura Date: Sun, 10 Aug 2008 15:44:12 +0000 Subject: [PATCH] Added built-in predicate format/1 for compatibility with SWI-Prolog. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2303 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- docs/yap.tex | 8 ++++++++ pl/yio.yap | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/docs/yap.tex b/docs/yap.tex index 5d3d0ec06..a664881f4 100644 --- a/docs/yap.tex +++ b/docs/yap.tex @@ -4854,6 +4854,14 @@ The two @code{~t} escape sequence force filling both before and after @code{Hello}. Space is then evenly divided between the right and the left sides. + +@item format(+@var{T}) +@findex format/1 +@saindex format/1 +@cnindex format/1 +Print formatted output to the current output stream. + + @item format(+@var{S},+@var{T},+@var{L}) @findex format/3 @saindex format/3 diff --git a/pl/yio.yap b/pl/yio.yap index 15758a758..652a75925 100644 --- a/pl/yio.yap +++ b/pl/yio.yap @@ -592,6 +592,10 @@ print(Stream,T) :- print(_,_). +format(T) :- + format(T, []). + + /* interface to user portray */ '$portray'(T) :- \+ '$undefined'(portray(_),user),