Page 1 of 1

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

Posted: 29 Oct 2016 3:41
by nicoloso100
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.

Posted: 29 Oct 2016 20:12
by Thomas Linder Puls
The SWI code you present there is quite close to the code in the Fundamental Visual Prolog tutorial.