Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Programming (https://www.askmehelpdesk.com/forumdisplay.php?f=437)
-   -   Anyone know how to work with PROLOG (https://www.askmehelpdesk.com/showthread.php?t=334963)

  • Mar 28, 2009, 11:31 AM
    albear
    Anyone know how to work with PROLOG
    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
  • Mar 28, 2009, 02:08 PM
    Scleros
    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.
  • Mar 28, 2009, 02:13 PM
    albear

    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
  • Mar 28, 2009, 02:25 PM
    Scleros
    I now know something about Prolog.

  • All times are GMT -7. The time now is 10:49 PM.