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
Post a Comment