8.5 Numeric constants (Ad)
Another kind of term is numeric constants. Numeric constants represent specific numbers, either integers or real numbers.
Integers are whole numbers and look like this:
Reals are numbers with decimal fractions, and look like this:
Thus numeric constants are numbers, and can be either integers or real numbers. They can be positive or negative.
It is time we have a quiz. The next page will be just that. When the quiz is done, we will go on to a new chapter, leaving the other two kinds of term (lists and variables) for later. The next chapter introduces you to a simple Prolog program.
Prev: 8.4 Atomic constants
Up: 8 Terms
Next: 8.6 Quiz: Terms