Sir you're doing a fantastic job at tooling. Increasing Prolog spread by creating professionally tooled and performed videos is a noble use of intellect.
@ThePowerOfProlog4 жыл бұрын
I'm so happy that you find this material useful, and I greatly appreciate that you have taken the time to write this, thank you a lot! Enjoy!
@Dezomm4 жыл бұрын
Fantastic videos, thank you so much for all you do.
@agymihai5 жыл бұрын
It doesn't work quite like that for me. Here's the a Prolog interaction where I've defined color/1, tested the definition to see that it really was defined properly and then making a query. Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.1) SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software. Please run ?- license. for legal details. 2 ?- color(red). true. 3 ?- color(blue). true. 4 ?- color(green). true. 5 ?- color(X). X = red ; X = blue . Where is the "green", damn it?
@stefankral12645 жыл бұрын
The devil is in the details: there's " ." at the alleged end of the answers. Notice the space character before the period? This indicates that there might be more answers, but Prolog has ended listing them all upon your request. Most likely you entered ';' followed by a newline which Prolog reads as "more solutions please" followed by "I have seen enough answers". Try the same queries again in a terminal window-you probably ran the shell within emacs without the right editor settings... HTH!
@hinata25784 жыл бұрын
What program are you using to test your code. Are your queries truly returning "true." With a period at the end? Or are they returning "true" without a period at the end? Does it matter?
@ThePowerOfProlog4 жыл бұрын
The toplevel is out of scope of the Prolog ISO standard, so the actual interaction you see in any system may differ from what I show here. However, in the ideal case, there is at least some way in which the system indicates the different cases, notably whether the query succeeds deterministically, or leaves a choice-point.