The editor I used in class (called PCE Emacs) comes with your SWI Prolog download. However, the default install is configured to use your normal text editor (usually Notepad). In order to make PCE Emacs the default editor from SWI Prolog, do the following
:- set_prolog_flag(editor, pce_emacs).
Warning: (c:/program files/prolog/problem1.pro:5): Clauses of foo/2 are not together in the source-file % problem1 compiled 0.00 sec, 0 bytesWhat does this mean?
Generally, Prolog programs are easier to read when all of the clauses with the same head are grouped together. Note, this is not required, which is why it is only a warning and not an error. To make the message go away, simply make sure all rules with the same functor in the head (i.e., left hand side) and all facts with the same functor are on consectutive lines.