Constant

A computing term.

A constant is a named value within a computer program that cannot be changed as the program runs.

For example, a constant can be set to hold the current VAT rate

VAT = 0.20

Then it is used in calculations with its name:

Cost = price + price * VAT

The advantages of using a constant rather than a specific value are:-

  • Makes source code easier to understand in terms of purpose
  • No need to re-write every instance of a value in the program, only change the constant declaration

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Constant

2020-10

back to glossaryback to glossary