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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -