'if' in prolog?

Posted by jreid9001 on Stack Overflow See other posts from Stack Overflow or by jreid9001
Published on 2010-05-17T12:38:46Z Indexed on 2010/05/17 12:50 UTC
Read the original article Hit count: 123

Filed under:

Probably a stupid question, but I can't find any documentation anywhere for it. Is there a way to do an if in prolog, e.g. if a variable is 0, then to do some actions (write text to the terminal). An else isn't even needed, but I can't find any implementation of if.

© Stack Overflow or respective owner

Related posts about prolog