[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Prolog and C questions
From: |
Gerard Palma |
Subject: |
Prolog and C questions |
Date: |
Thu, 14 Jun 2001 10:40:24 +0100 (BST) |
Hi Guys
I have not grasped how Prolog and C interface yet.
It sounds either extremely complicated task for the programmer, or am i
missing somethting.
Variables in Prolog are different from that of C, in C you have to declare
them as a type, but in prolog they can be different things at different times.
So how do you pass through variables from prolog to a C function?
How do you get the return value?
I would be very interested if someone could put some more light on this
subject.
Regards
Gerard
On Wed, 13 Jun 2001, Leonardo B. Lopes wrote:
> I like this tutorial:
>
>
> http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/pt_framer.html
>
> although it may be more advanced than what you are looking for. As for the
> specific question you asked, apparently, the clause homem/1 is not defined
> in your code, but is being specified as part of the man/1 clause. If you
> don't understand what I just said, then you probably need to go back to a
> good prolog book and read the first chapter. "The Art of Prolog" is always
> a top candidate...
>
> Good Luck!
> Leo.
>
>
> On Wed, 13 Jun 2001, Tiago Sant' Anna da Silva wrote:
>
> > Hi,
> > Could, please somebody tell me why I can't do anything in this program?
> > This is my fist time, I've never used this program before, just at
> > classroom,
> > in theoric way.
> > Is there a place with a tutorial, about syntax.
> >
> > this is an error I got:
> > | ?- men(tiago).
> > uncaught exception: error(existence_error(procedure,homem/1),top_level/0)
> >
> > why?
> >
> > Thank's
> >
> > --
> > |===|===|===|===|===|===|===|===|===|===|===|===|===|
> >
> > -~^''"''^~-~^? => Tiago Sant' Anna da Silva
> > address@hidden
> >
> > Linux user #136940
> > Get counted at http://counter.li.org
> >
> > ICQ: 14252973
> >
> > |===|===|===|===|===|===|===|===|===|===|===|===|===|
> >
> > _______________________________________________
> > Users-prolog mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/users-prolog
> >
>
> ========================================================================
> Leonardo B. Lopes address@hidden
> Ph.D. Student (847)491-8470
> IEMS - Northwestern University http://www.iems.nwu.edu/~leo
>
>
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/users-prolog
>
Gerard Palma
Support Engineer
3Glab
Tel: 01223478922
email: address@hidden
- Help Me, Tiago Sant' Anna da Silva, 2001/06/13
- RE: Help Me, Mattias Waldau, 2001/06/13
- Re: Help Me, Leonardo B. Lopes, 2001/06/13
- Prolog and C questions,
Gerard Palma <=