Prolog/Variables

A PROLOG variable can represent anything; a number, a name, a structure, an array, something as complicated as the known universe. A PROLOG program works by constraining the variables until eventually they have particular values; then telling you what the values are. A simple program might be

X is 3+2.

and when you run it, the result will be

X=5
Yes.

The program might not go as far as to constrain the variables to have exact values, so you might get