how to do new line char
From: Drew (drew_at_drew.com)
Date: 03/02/05
- Next message: Zoltan Somogyi: "Re: List cons functor (was Re: The meaning of module overriding syntax mod:goal in different Prologs)"
- Previous message: Finton Stack: "-->?"
- Next in thread: Brian Hulley: "Re: how to do new line char"
- Reply: Brian Hulley: "Re: how to do new line char"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 01 Mar 2005 18:12:49 -0500
Hi All:
I have a predicate which has the below as one of its clauses. So, the
output of my Prolog program is for example:
X = [s(aberdeen, 682, [penzance, exeter, bristol, birmingham,
manchester, carlisle, edinburgh, aberdeen]), s(aberystwyth, 352,
[penzance, exeter, bristol, swansea, aberystwyth]), s(birmingham, 274,
[penzance, exeter, bristol, birmingham]), s(brighton, 287, [penzance,
exeter, portsmouth, brighton]), s(bristol, 188, [penzance, exeter,
bristol]), ......
I would like to make the program print a newline character after each
s (small s) set that is displayed to improve readability of the
output. Note that each s has 3 parts to it. A destination city,
mileage, and then a list with other cities.
Here is the clause. I want to print a newline after each small
s--s(Vertex, Distance, Path) that is displayed. Is it possible? I'm
using SWI-Prolog.
S = s(Vertex, Distance, Path),
Thanks!
Drew
- Next message: Zoltan Somogyi: "Re: List cons functor (was Re: The meaning of module overriding syntax mod:goal in different Prologs)"
- Previous message: Finton Stack: "-->?"
- Next in thread: Brian Hulley: "Re: how to do new line char"
- Reply: Brian Hulley: "Re: how to do new line char"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|