How to do this in Visual Prolog (I have the example on SWI Prolog)

Discussions related to Visual Prolog
Posts: 1
Joined: 29 Oct 2016 3:27

How to do this in Visual Prolog (I have the example on SWI Prolog)

Unread post by nicoloso100 » 29 Oct 2016 3:41

Hello community, i am very newbies in prolog but I want to create something, its simple, I just have to type a word in a edit_cl and when I press a buttom, this word have to link with my knowledgebase and add in a listbox_cl the other variable.

the process is similar to this, but in swi prolog:

Code: Select all

article(shampoo, cleanliness). article(apple, food). article(orange, food). article(soap, cleanliness).   ask_article(X,Y):- article(X,Y).
and I showld ask like this:

Code: Select all

ask_article(Apple, Y).
and it has to show me food.

is the same thing but the word (in this case "apple" like the example) come from an edit_cl, and the answers (in this case food) goes to a listbox_cl

can someone please help me?, y really research a lot but there is very little fast info about visual prolog.

User avatar
Thomas Linder Puls
VIP Member
Posts: 1625
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 29 Oct 2016 20:12

The SWI code you present there is quite close to the code in the Fundamental Visual Prolog tutorial.
Regards Thomas Linder Puls

Post Reply