Re: please make the following prolog program
- From: Martin Riener <martin.riener@xxxxxxxxx>
- Date: Sun, 30 Mar 2008 13:28:38 +0200
naznadi@xxxxxxxxx wrote:
please make the following prolog program> [...]
i hav try .but require result not come
my predicatelike this
plz find out mistake from it.
listtran([],[]).
listtran([Ha/Ta],[Hb/Tb]):-tran(Ha,Hb),listtran(Ta,Tb).
the given question is this:
you have a syntax error when constructing lists. just use the pipe symbol | instead of slash / . if you google for "prolog lists" you will find eg. http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_7.html where the list syntax is described in more detail.
hth Martin
.
- References:
- please make the following prolog program
- From: naznadi
- please make the following prolog program
- Prev by Date: please make the following prolog program
- Next by Date: swi prolog macbook bus error
- Previous by thread: please make the following prolog program
- Next by thread: swi prolog macbook bus error
- Index(es):
Relevant Pages
|
|