1.2.3 Variables

A variable is a string of upper-case letters, lower-case letters, digits and underscore characters that starts either with an upper-case letter or with underscore. For example, X, Y, Variable, _tag, X_526, and List, List24, _head, Tail, _input and Output are all Prolog variables.

The variable _ (that is, a single underscore character) is rather special. It's called the anonymous variable, and we discuss it in a later lecture.

Patrick Blackburn, Johan Bos and Kristina Striegnitz
Version 1.2.5 (20030212)