The syntax of the Prolog language Prolog programs are entirely built from terms . There are two kinds of atoms. The latter have special purposes. An atom may contain digits but must not begin with one. Thus, c23 is a fine atom, but 23c is not.
Any expression enclosed in single quotes is also an atom.
A variable is anything beginning with a capital or an underscore. Structures come in various flavours. A compound term consists of a functor and one or more terms called arguments . Sometimes a functor is allowed to appear between its arguments. This is only allowed if the functor has been declared to be a so-called operator .