[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: uncaught exception: error(existence_error(procedure,even/1),top_leve
From: |
JSibelius |
Subject: |
Re: uncaught exception: error(existence_error(procedure,even/1),top_level/0) |
Date: |
Tue, 15 Dec 2009 17:59:55 -0800 (PST) |
James Gale wrote:
>
> Hi I'm a newbee to prolog, and have just installed gnu prolog but what
> every I enter into the console I get this error, uncaught exception:
> error(existence_error(procedure,even/1),top_level/0)
>
> example.
>
> GNU Prolog 1.3.1
> By Daniel Diaz
> Copyright (C) 1999-2009 Daniel Diaz
> | ?- even(X).
> uncaught exception: error(existence_error(procedure,even/1),top_level/0)
>
> not sure if the installation was wrong, but got not errors or I'm missing
> something very simple.
> also is there a good FAQ's page for this interpreter.
>
> many thanks
>
> James.
>
> ps. sorry if this is a silly posting but didn't know what else to try :S
>
>
I had the same error, but I figured it out :) What you have to do is create
a "logic database". This is a simple text file with the facts and the rules
of the program (or the "program's universe" if u like :P) Make a blank text
file and enter:
even(a).
even(b).
compile with:
address@hidden:~/prog/prolog$ gplc nubble.pro
execute with:
address@hidden:~/prog/prolog$ ./nubble
This is what you get:
GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
| ?- even(X).
X = a ? ;
X = b
yes
| ?- even(a).
yes
| ?- even(c).
no
| ?-
I hope this helps :)
--
View this message in context:
http://old.nabble.com/uncaught-exception%3A-error%28existence_error%28procedure%2Ceven-1%29%2Ctop_level-0%29-tp22366566p26804308.html
Sent from the Gnu - Prolog - Users mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: uncaught exception: error(existence_error(procedure,even/1),top_level/0),
JSibelius <=