Prolog: Clauses are not together in source-file -


i have piece of code:

% family tree female(pen). male(tom). male(bob). female(liz). female(pat). female(ann). male(jim).  parent(pam, bob). parent(tom, bob). parent(tom, liz). parent(bob, ann). parent(bob, pat). parent(pat, jim). 

i error:

warning: clauses of female/1 not in source-file warning: clauses of male/1 not in source-file 

what purpose of error?
mean, file compile , run fine , aware of meaning of error. why?
notice enforce best practice?

i new logic programming.
thanks!

correct, warning enforce best practices, put related clauses in source file. other that, proximity of clauses each other in source file not matter, long relative order not change.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -