COMMANDS ON SWI-Prolog Shell // Note the variables should not be in small case. It needs to have at least one Upper Case character. 1 ?- a is 2. false. 2 ?- A is 2. A = 2. 3 ?- number is 2. false. 4 ?- Number is 2. Number = 2.
1 ?- A IS 7. ERROR: Syntax error: Operator expected ERROR: A ERROR: ** here ** ERROR: IS 7 . 1 ?- A is 7. A = 7.
1 ?- X is 7. Y is 3. Z is X+Y. X = 7. Y = 3. ERROR: is/2: Arguments are not sufficiently instantiated 4 ?- X is 7, Y is 3, Z is X+Y. X = 7, Y = 3, Z = 10.
1 ?- X is 7, Y = 10, C is X + Y. X = 7, Y = 10, C = 17. 2 ?- X is 7, Y = 10, C = X + Y. X = 7, Y = 10, C = 7+10. |