PDA

View Full Version : Anyone know how to work with PROLOG


albear
Mar 28, 2009, 11:31 AM
I get a load of system errors around this point 'Syntax error: Operator expected'

/* Chickenpox */

Symptoms(agitation, chickenpox).
Symptoms(small red lesions/spots, chickenpox).
Symptoms(mild flue-like, chickenpox).
Symptoms(fever, chickenpox).
Symptoms(body aches, chickenpox).
Symptoms(headache, chickenpox).
Symptoms(loss of appetite, chickenpox).
Symptoms(nausea, chickenpox).

Any help would be greatly appreciated

Scleros
Mar 28, 2009, 02:08 PM
I don't know a thing about Prolog, but...

Syntax errors in most languages are usually due to a typo or invalid characters in an expression that the parser doesn't comprehend. Look at the use of white space, ".", "-", and the "/" in your expressions. The latter tend to be arithmetic operators. Is it valid for Prolog? The location of the first error is usually the culprit. The remaining errors are the parser being confused.

albear
Mar 28, 2009, 02:13 PM
No it wasn't that, but you did make me think abit more and I sussed out it doesn't like more than one word before the commer, so I put in some '-' to connect the words and jobs a good'un :) thanks

Scleros
Mar 28, 2009, 02:25 PM
I now know something about Prolog.