Hi,
cdio...@gmail.com schrieb:
> invoice(001, John, Potatoes, 20).
> invoice(002, John, Tomatoes, 10).
> invoice(003, Mary, Soap, 50).
> invoice(004, Mark, Potatoes, 20).
> invoice(005, Mary, Detergent, 15).
Please use:
invoice(001, 'John', 'Potatoes', 20).
invoice(002, 'John', 'Tomatoes', 10).
invoice(003, 'Mary', 'Soap', 50).
invoice(004, 'Mark', 'Potatoes', 20).
invoice(005, 'Mary', 'Detergent', 15).
If you use uppercase and no quotes, the Prolog system
thinks you are using a variable. You will get singleton
errors without correcting it.
> Food(Potatoes).
> Food(Tomatoes).
> CleanProd(Soap).
> CleanProd(Detergent).
Please use:
food('Potatoes').
food('Tomatoes').
clean_prod('Soap').
clean_prod('Detergent').
Same problem as above, you will get superflous token
errors without correcting it. Additionaly underscores are
recommended instead of camel case for predicate names,
but this is only a style issue.
See also:
Coding Guidelines for Prolog
Michael A. Covington et al.
http://arxiv.org/abs/0911.2899
Bye