Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
first steps
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Haris Bogdanovich  
View profile  
 More options Sep 23 2011, 7:18 am
Newsgroups: comp.lang.prolog
From: "Haris Bogdanovich" <fbogdano...@xnet.hr>
Date: Fri, 23 Sep 2011 13:18:45 +0200
Local: Fri, Sep 23 2011 7:18 am
Subject: first steps
Hi.

When I entuer in gnu prolog:
man (adam).
I get the following error:
uncaught exception: error(syntax_error('user_input:1 (char:5) . or operator
expected after expression'),read_term/3)
That would be  entering a fact.
What am I doing wrong ?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Davison  
View profile  
 More options Sep 23 2011, 8:44 am
Newsgroups: comp.lang.prolog
From: Andrew Davison <andrew.davi...@gmail.com>
Date: Fri, 23 Sep 2011 22:44:29 +1000
Local: Fri, Sep 23 2011 8:44 am
Subject: Re: first steps
On 23/09/2011 9:18 PM, Haris Bogdanovich wrote:

> Hi.

> When I entuer in gnu prolog:
> man (adam).
> I get the following error:
> uncaught exception: error(syntax_error('user_input:1 (char:5) . or operator
> expected after expression'),read_term/3)
> That would be  entering a fact.
> What am I doing wrong ?

You are putting a space between 'man' and the '('.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Haris Bogdanovich  
View profile  
 More options Sep 23 2011, 8:57 am
Newsgroups: comp.lang.prolog
From: "Haris Bogdanovich" <fbogdano...@xnet.hr>
Date: Fri, 23 Sep 2011 14:57:43 +0200
Local: Fri, Sep 23 2011 8:57 am
Subject: Re: first steps

> You are putting a space between 'man' and the '('.
Now I wrote:

man(adam).
without a space and I got:
uncaught exception: error(existence_error(procedure,man/1),top_level/0)
What's wrong now ?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tomasz Budzeń  
View profile  
 More options Sep 23 2011, 9:38 am
Newsgroups: comp.lang.prolog
From: Tomasz Budzeń <tomasz.bud...@gmail.com>
Date: Fri, 23 Sep 2011 06:38:22 -0700 (PDT)
Local: Fri, Sep 23 2011 9:38 am
Subject: Re: first steps
On 23 Wrz, 14:57, "Haris Bogdanovich" <fbogdano...@xnet.hr> wrote:

> > You are putting a space between 'man' and the '('.
> Now I wrote:

> man(adam).
> without a space and I got:
> uncaught exception: error(existence_error(procedure,man/1),top_level/0)
> What's wrong now ?

You try to query fact man/0, but you didn't have any facts in
database, so you get existence_error.
So you can either declare fact: ?- assertz(man(adam)).
or consult Prolog source file containing your facts, man(adam). or
man(X).

Regards,
Tomasz Budzeń


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chip Eastham  
View profile  
 More options Sep 23 2011, 12:14 pm
Newsgroups: comp.lang.prolog
From: Chip Eastham <hardm...@gmail.com>
Date: Fri, 23 Sep 2011 09:14:09 -0700 (PDT)
Local: Fri, Sep 23 2011 12:14 pm
Subject: Re: first steps
On Sep 23, 9:38 am, Tomasz Budzeń <tomasz.bud...@gmail.com> wrote:

This is something of a quirk/feature of gprolog.
Many implementations will return "no" or "false"
in such a case.

[GNU Prolog: Existence error]
http://www.gprolog.org/manual/gprolog.html#htoc40

Existence errors can be "caught" and handled by a
user supplied predicate.

This behavior can be changed by setting of a Prolog
flag called "unknown".  See here for the possible
values of that changeable flag:

http://www.gprolog.org/manual/gprolog.html#set-prolog-flag/2

regards, chip


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chip Eastham  
View profile  
 More options Sep 26 2011, 11:34 am
Newsgroups: comp.lang.prolog
From: Chip Eastham <hardm...@gmail.com>
Date: Mon, 26 Sep 2011 08:34:01 -0700 (PDT)
Local: Mon, Sep 26 2011 11:34 am
Subject: Re: first steps
On Sep 23, 8:57 am, "Haris Bogdanovich" <fbogdano...@xnet.hr> wrote:

> > You are putting a space between 'man' and the '('.
> Now I wrote:

> man(adam).
> without a space and I got:
> uncaught exception: error(existence_error(procedure,man/1),top_level/0)
> What's wrong now ?

It occurs to me perhaps you really mean to "assert" the fact
man(adam),
rather than to query to see if it is true.  To do this assertion:

:- assert(man(adam)).
yes

After that any queries for "man(adam)" will succeed.

regards, chip


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »