next up previous
Next: Pose a Query Up: prolog Previous: Sample Program

Test Sample Program

Load intro.pl into Prolog by typing

[intro].

The ``yes'' at the end indicates that Prolog checked the code and found no errors.

Check all of what Prolog has recorded by asking for a listing.

?- listing.

%   Foreign: rl_add_history/1

%   Foreign: rl_read_init_file/1


likes(mary, food).
likes(mary, wine).
likes(john, food).
likes(john, wine).

Yes