Hello World in Prolog
Every programming journey starts with Hello World. Let’s write our first Prolog program and get our first taste of logic programming.
The Code
Create a file named hello.pl:
| |
Every programming journey starts with Hello World. Let’s write our first Prolog program and get our first taste of logic programming.
Create a file named hello.pl:
| |
Prolog’s data model is radically different from mainstream languages. There are no typed declarations, no assignment statements, and no primitive/object divide. Instead, everything is a term, …
Read more →In most languages an operator like + quietly computes something. In Prolog, that assumption will trip you up. Prolog is a logic language, so 1 + 2 is not the number 3 — it is a term, a tree with the …
Showing 1–3 of 3 posts (page 1 of 1)